How to remove the admin dashboard header bar

Members 5 posts 2 voices

  1. I’m a new user of the Members plugin but already a big fan.

    I need to edit certain Roles to remove the top bar in the WordPress admin dashboard that has the WordPress logo on the left and “Howdy” and the user name and other controls like the search bar and the drop down menu that gives them access to editing their user profile etc.

    How do I do that? Which capability or capabilities do I need to deny to any given role to remove that top dashboard bar?

    Thank you!

  2. It’s also ok if you tell me that this is something better done by another plugin altogether, such as “Admin Bar Disabler” or something like that.

  3. This is definitely not something Members can handle. There are no WP capabilities for permission to the admin bar. However, there are a few ways of disabling it.

    Before I get to that though, you should be aware the WP will only allow you to disable on the *front* end of the site. Within the admin, it will always be loaded. Maybe there’s a plugin that hides it, but WP is meant to have the admin bar within the admin.

    So, moving on to how to disable it.

    1) Easiest route is to go to your profile (or user edit screen) and turn it off on a per-user basis. If dealing with many users though, this might be a good option.

    2) You can add this one line of code in your theme’s functions.php file to disable for everyone (this could also be done on a conditional basis with a little extra code or even a custom capability):

    add_filter( 'show_admin_bar', '__return_false', 999 );

    3) Install a plugin such as “Admin Bar Disabler”.

  4. Thanks for that very thorough answer, Justin. I really appreciate your help.

    Just to make sure I understood what you meant: where you said in number, “1) …If dealing with many users though, this might be a good option” did you mean to say “this might NOT be a good option”?

    In my situation, I only need to disable it for users with one of five specific roles.

    There will be about 7500 users in the project I’m working on. All but 10 or so of them should NOT have access to the backend.

    So, I’m thinking plugin here. 🙂


  5. Yes, I meant might *not*. 😉

    A plugin would definitely be the way to go if you’re wanting to remove admin access altogether.