The admin bar (WordPress also calls it the toolbar) is the dark bar at the top of your website when you’re logged in. It’s handy for you, but your clients, members or customers usually don’t need it. This guide shows three ways to hide it: for a single user, for whole user roles with a free plugin, or with a code snippet.
The quick answer: install the free Better Admin Bar plugin, go to Settings → Better Admin Bar → Admin Bar and tick the user roles that shouldn’t see the admin bar.
Method 1: Hide the admin bar for one user
- Go to Users → Profile.
- Untick Show Toolbar when viewing site.
- Click Update Profile.
This changes one account only. To do it for someone else, edit their user under Users → All Users. With more than a few users that gets tedious, and new users still see the admin bar. For whole groups of users, use Method 2.
Method 2: Hide the admin bar for user roles (free plugin)
Better Admin Bar lets you choose which user roles see the admin bar. Since it goes by role, new users get the right setting automatically.
- Install and activate Better Admin Bar (Plugins → Add New Plugin, search for “Better Admin Bar”).
- Go to Settings → Better Admin Bar and open the Admin Bar tab.
- Under Remove Admin Bar, tick the roles that shouldn’t see it, for example Subscriber or Customer. Tick All users to hide it for everyone.
- Click Save Changes.
Nothing ticked means everyone sees the admin bar as usual. Roles added by other plugins, like WooCommerce’s Customer, are in the list too.
Don’t have the plugin yet? Download Better Admin Bar for free from WordPress.org.
Method 3: Hide the admin bar with code
Prefer code? This line hides the admin bar for everyone. Add it to your child theme’s functions.php or to a code snippets plugin.
add_filter( 'show_admin_bar', '__return_false' );
To hide it for everyone except administrators:
add_action( 'after_setup_theme', function () {
if ( ! current_user_can( 'manage_options' ) ) {
show_admin_bar( false );
}
} );
Code works, but every change means editing code again. With the plugin, you change it with a checkbox.
Which method should I use?
- Only for yourself: Method 1.
- For subscribers, customers, members or clients: Method 2.
- You don’t want another plugin: Method 3.
What about the admin bar in the dashboard?
All three methods hide the admin bar on the frontend of your website, the part your visitors see. Inside the WordPress dashboard the bar always stays: WordPress needs it there for the account menu and notifications.
The admin bar still shows?
- You’re testing as an administrator: you keep seeing it unless Administrator is ticked. Log in as a test user with the role in a private browser window.
- Caching: clear the cache of your caching plugin and reload the page.
- Another plugin turns it back on: some membership and community plugins have their own admin bar setting. Check their settings, or deactivate plugins one by one to find it.
Give your clients something better
Hiding the admin bar for clients? Give them the quick access panel instead: a small floating button with only the links they need, like Edit Page and Dashboard. It’s part of Better Admin Bar, free. More tips: make WordPress easier for your clients.
