Can anyone please help me with my problem regarding my WordPress left hand side admin menu. I want it collapsed at all times, how do I do that?

Well, I'm creating a WP Multisite so I want that menu bar to be always collapsed at all times.

Any help would be appreciated. Looking for code or if plugin exists, should be fine, too. Thanks.

3 Answers 3


This will properly override the user settings to keep the menu collapsed for all users:

 * Reset user setting to always collapse the admin menu.
 * @see set_user_setting()
function wpdocs_always_collapse_menu() {
    if ( 'f' != get_user_setting( 'mfold' ) ) {
        set_user_setting( 'mfold', 'f' );
add_action( 'admin_head', 'wpdocs_always_collapse_menu' );

You can try something like this.

function make_menu_unfolded() {
    print '<script>jQuery(document).ready(function(){jQuery("body").addClass("folded")})</script>';
add_filter( 'admin_head', 'make_menu_unfolded' );

This is make left menu fold always.

  • Not sure I'd ever recommend dumping some jQuery into the admin head just to add a class. Sep 28, 2014 at 1:36

If you want the admin menu to always be uncollapsed use this in your functions.php file.

function wpdocs_always_unfold_menu() {
    if ( 'f' != get_user_setting( 'unfold' ) ) {
        set_user_setting( 'unfold', 'f' );
add_action( 'admin_head', 'wpdocs_always_unfold_menu' );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.