WordPress admin sidebar consistency

Stop the sidebar from collapsing to icons by accident

Disable Menu Collapse hides the collapse button and keeps the admin sidebar fully expanded, so it never shrinks to an unlabeled column of icons.

  • Hides the collapse/expand arrow at the bottom of the sidebar.
  • Keeps the menu expanded regardless of a user's previously saved state.
  • Also blocks WordPress's automatic icon-only collapse at medium screen widths.
  • Prevents a flash of the collapsed menu before the fix applies.
Admin Sidebar ConsistencyDisable Menu Collapse
Collapse arrow button
body.folded (saved collapsed state)
body.auto-fold (responsive icon-only)
The sidebar stays fully expanded, with labels, at every screen width.
Sidebar locked openNo accidental collapse, no way to trigger it.
Active
Quick answer

What does Disable Menu Collapse do?

When the disable_menu_collapse module is active, TOWP_Disable_Menu_Collapse hooks into admin_head to hide the collapse button with inline CSS and to strip the folded and auto-fold classes WordPress uses to shrink the sidebar to icons only. The class removal runs synchronously before the page finishes loading, so there's no visible flash of a collapsed menu before the fix takes effect, and again on DOMContentLoaded as a fallback. Together, this keeps the sidebar fully expanded whether it was collapsed manually in the past, or WordPress's own responsive layout would normally auto-collapse it at a medium screen width.

The "one misclick, gone for good" problem

The collapse button is easy to hit and hard to undo

A small control at the edge of the sidebar can quietly reshape the entire admin for anyone who clicks it by mistake.

It's easy to trigger by accident

The collapse arrow sits at the very bottom of the sidebar, small and easy to click without meaning to, especially for someone who isn't used to navigating wp-admin.

Once collapsed, it's disorienting

The labels disappear, the menu becomes a column of icons, and there's no obvious explanation for what happened or how to undo it, especially for a client who didn't build the site.

A dedicated WordPress solution

Remove the possibility, not just the confusion

The module makes the collapsed state unreachable, instead of leaving it there to explain after the fact.

The collapse button disappears

The arrow that triggers the collapsed state gets hidden, so there's nothing to misclick in the first place.

The menu stays expanded regardless of history

Even if a user's profile previously saved a collapsed state, the sidebar loads fully expanded every time.

Consistent at every screen width

WordPress's own automatic icon-only collapse at medium widths is blocked too, so the sidebar looks the same at more screen sizes.

Verified feature set

Both collapse paths, closed off

Every capability below is present in the supplied PHP class and its settings registration.

Manual collapse override

The folded state gets overridden

CSS rules force the sidebar's width, labels, icons and content margin back to their expanded values even when body.folded is present.

body.foldedForced expanded layout
Responsive collapse override

The auto-fold state is stripped too

WordPress's own automatic icon-only collapse at medium screen widths gets removed alongside the manually-triggered one.

auto-foldMedium-width screens
No flash of the wrong state

Classes removed before paint

The folded and auto-fold classes are stripped synchronously, before the browser has a chance to render the collapsed layout.

Synchronous removalNo FOUC
A fallback pass too

Removed again on DOMContentLoaded

A second removal runs once the DOM is ready, catching any case where the class gets reapplied after the first pass.

DOMContentLoadedFallback pass
Admin-only, minimal footprint

A small style and script block

The entire fix is one inline style block and one small script, both scoped to admin_head.

admin_headInline only
Practical use cases

Where a locked-open sidebar helps most

The module supports any admin where a consistent, labeled sidebar matters more than the collapse feature.

Client-facing sites

Prevent a client from accidentally collapsing the sidebar and then needing an explanation for how to undo it.

Onboarding new team members

Give every new user a consistent, fully-labeled sidebar from their very first login, without depending on their own screen width.

Sites viewed on a range of screen widths

Keep the sidebar's labeled layout consistent even at screen sizes where WordPress would otherwise auto-collapse it.

Operational benefits

A sidebar that looks the same for everyone

The module combines a hidden control, an overridden layout state and a flash-free transition.

One less way to get confusedRemoving the collapse control removes a common, low-value source of "why does my admin look different" questions.
Predictable for every user, every timeThe sidebar looks the same regardless of what any individual user may have previously clicked.
Consistent across screen sizesThe same fully-labeled sidebar shows up whether the admin is being viewed on a wide monitor or a narrower laptop screen.
No flash of the wrong layoutThe synchronous class removal means visitors never briefly see the collapsed sidebar before the fix applies.
Performance behaviour

A tiny inline fix, applied once, early

The verified implementation is compact and runs synchronously with no ongoing overhead.

A small inline style and script

The entire fix is a compact CSS block and a short script, both printed directly in admin_head with no additional file requests.

Runs once, early

The class removal happens synchronously as soon as the script executes, avoiding a wait for the rest of the page to load.

No ongoing processing

Once the classes are removed, there's nothing left running; the fix isn't a continuous check.

Security implementation

A visual fix, nothing about access changes

The code only affects sidebar layout and never touches capabilities, data, or the front end.

01

Administrator-only configuration

Only an administrator with access to TheOneWP settings can enable the module.

02

A read-only visual change

The module only hides a button and strips two CSS classes; it doesn't process or store any data.

03

No effect on user capabilities

Keeping the sidebar expanded doesn't change what any user can see or do beyond the sidebar's own layout.

04

Scoped entirely to wp-admin

The admin_head hook this module uses only fires in the admin area, so there's no front-end exposure at all.

Verified compatibility

Built around the real WordPress sidebar markup

The supplied code integrates through APIs present in WordPress core. No compatibility claim beyond the verified implementation is assumed.

Styling hook

admin_head

The standard WordPress hook for adding inline styles and scripts to the admin page's head section.

admin_headNative hook
Core CSS classes

folded and auto-fold

The exact two classes WordPress core itself adds to the body element for manual and automatic sidebar collapse, respectively.

body.foldedbody.auto-fold
Core markup

#collapse-button and #adminmenu

Targets the actual IDs and structure WordPress renders for the sidebar and its collapse control.

#collapse-button#adminmenu
Solution comparison

TheOneWP versus common alternatives

Compare the verified Disable Menu Collapse implementation with a typical hand-written admin CSS snippet.

CapabilityTheOneWP Disable Menu CollapseOther common solutions
Hiding the collapse button Removed with scoped inline CSSUsually a custom admin CSS snippet
Overriding a previously saved collapsed state Forced back to expanded on every loadRarely addressed by a simple CSS-only fix
WordPress's automatic responsive collapse Also blocked at medium screen widthsOften missed entirely by manual-only fixes
Avoiding a flash of the collapsed layout Classes removed synchronously before paintA CSS-only fix can still show a brief flash
Administration One toggle, nothing else to configureRequires editing a child theme's CSS file directly
Recommended workflow

Lock the sidebar open in four steps

Verify across a few screen widths, since the responsive collapse only shows up in a certain range.

01

Enable Disable Menu Collapse

Activate the module from the TheOneWP Backend settings tab; there's nothing else to configure.

02

Confirm the collapse button is gone

Check the bottom of the sidebar on any admin screen to confirm the arrow no longer appears.

03

Check a range of screen widths

Resize the browser, or check on a narrower laptop screen, to confirm the sidebar stays expanded rather than auto-collapsing.

04

Leave it on

Since there's no ongoing configuration, the module simply keeps working once enabled.

Best practices

A near-zero-risk change worth making by default

This is one of the lowest-risk, highest-clarity fixes available for a client-facing admin.

01

Enable it on any client-facing site

The collapse control is a common, low-value source of confusion for anyone who didn't build the site themselves.

02

Check the sidebar on a few different devices

Confirm the expanded layout looks right on both a wide monitor and a narrower laptop screen.

03

Don't expect any change to menu content

This module only affects the collapsed/expanded state; menu items, order and labels are unaffected.

04

No further configuration is needed

Since it's a single toggle, there's nothing to revisit once it's enabled.

Common mistakes

Avoid assumptions that undersell what it covers

The module addresses more than the button alone, which is easy to miss on a first read.

Assuming it only affects the button

The module also overrides both the manually-saved collapsed state and WordPress's automatic responsive collapse, not just the button that triggers them.

Not checking medium screen widths

The auto-fold behavior only appears at certain screen widths, so testing only a full-width monitor can miss whether it's actually blocked.

Looking for a settings screen that isn't there

Like other single-purpose modules, this one is a toggle by design, with no further configuration screen.

Frequently asked questions

Disable Menu Collapse FAQ

These answers come directly from the verified class and its settings registration.

What does Disable Menu Collapse do?

It hides the collapse/expand arrow at the bottom of the admin sidebar and keeps the menu fully expanded, regardless of any previously saved collapsed state.

Does this only hide the button, or does it also fix an already-collapsed sidebar?

Both. It hides the button and overrides the folded state itself, so the sidebar loads expanded even if it was collapsed before.

Does this affect WordPress's automatic icon-only collapse at narrower screen widths?

Yes. The auto-fold class WordPress uses for that responsive behavior is removed alongside the manually-triggered collapsed state.

Will I briefly see the collapsed sidebar before it expands?

No. The relevant classes are removed synchronously, before the browser renders the collapsed layout, avoiding a visible flash.

Does this module require any setup after enabling it?

No. Enabling it is the entire configuration; there's nothing further to adjust.

Does this affect anything on the front end of the site?

No. The module only runs on admin_head, which is scoped entirely to wp-admin.

Can a user still collapse the sidebar some other way?

The button that normally triggers it is hidden, and even if a collapsed state is somehow set, the module's CSS forces the layout back to expanded.

Does this change which menu items appear in the sidebar?

No. It only affects whether the sidebar is expanded or collapsed to icons; menu content is unaffected.

Is this useful for sites with only one administrator?

It can still help, since even a single user can misclick the collapse arrow; the main benefit is largest on sites with multiple users or client access.

Who can turn this module on?

Only an administrator with access to the TheOneWP settings screen.

Stop explaining how to un-collapse the sidebar.Remove the possibility entirely.

Use Disable Menu Collapse to hide the collapse button and keep the sidebar fully expanded, for every user, at every screen width.