
Key Takeaways
- Any WordPress user can hide the admin bar on the front end for their own account by unticking "Show Toolbar when viewing site" under Users > Profile.
- The show_admin_bar filter hides the WordPress admin bar on the front end for chosen user roles or user IDs, and returning false for users without manage_options keeps it only for administrators.
- The show_admin_bar filter does not affect wp-admin, because WordPress always shows the admin bar inside the dashboard for logged-in users.
- The free Admin Bar Editor plugin by Pixar Labs has one switch that disables the front-end admin bar for all logged-in users, while hiding it for specific roles or usernames needs Admin Bar Editor Pro.
To hide the admin bar in WordPress for one user, untick "Show Toolbar when viewing site" in that user's profile. To hide it for a user role, add a short show_admin_bar filter in code, or use a no-code admin bar editor tool with role rules. Both methods remove the bar from the front end of the site, which is where it usually gets in the way.
This guide is about hiding the whole bar. To keep the bar but remove, add or reorder its items, read how to customize WordPress admin bar items instead. This guide covers each hide method, from the one-click profile setting to rules per role and per user, and why the bar stays inside wp-admin.
Which Way to Hide the Admin Bar Should You Use?
Use the Profile checkbox when one person wants a clean front end. Use the show_admin_bar filter when a rule must cover a whole role, such as all subscribers or shop customers. Use a plugin setting when you want the same role rules without editing code. All three hide the bar on the front end only.
| Method | Who it hides the bar for | Where | Code? | Plan |
|---|---|---|---|---|
| Users > Profile checkbox | One user | Front end | No | Core WordPress |
show_admin_bar filter | Everyone, chosen roles or chosen user IDs | Front end | Yes | Core WordPress |
| Admin Bar Editor, Frontend tab switch | All logged-in users | Front end | No | Free |
| Admin Bar Editor role and user rules | Chosen roles or usernames | Front end | No | Pro |
| Custom admin CSS | Chosen roles | wp-admin | Yes | Not recommended |
How to Hide the Admin Bar for Yourself or One User
To hide the admin bar for one user, go to Users > Profile (or Users > All Users > Edit for someone else), find the Toolbar row, untick "Show Toolbar when viewing site" and click Update Profile. The bar disappears from the front end for that user only. Every other user keeps their own setting.
- Log in and go to Users > Profile. An administrator can open any user from Users > All Users and click Edit.
- Find the Toolbar row near the top of the screen.
- Untick Show Toolbar when viewing site.
- Scroll down and click Update Profile (or Update User).

Here is the front end of our test site with the option ticked. The dark bar sits above the site header, with the site name, Customize, comments, New and the Howdy menu.

And here is the same page after unticking the option. The header moves up and the user sees the site the way visitors do.

This setting is per user, so it does not work well on large sites. On a site with hundreds of members, each person would have to change it. For a rule that covers a whole role, use code or a plugin.
How to Hide the Admin Bar Based on User Roles With Code
To hide the admin bar based on user roles, add a function to the show_admin_bar filter that returns false for the roles you choose and returns the normal value for everyone else. WordPress runs the filter on every front-end page, so the rule applies to every user in those roles at once.
Add each snippet to a small custom plugin or a code snippet manager, not to your theme's functions.php, which a theme update can overwrite. WP Adminify has a Code Snippets feature for this. Use only one of the snippets below at a time.
Hide it for everyone except administrators
This is the most common rule. Administrators keep the bar. Editors, authors, subscribers and customers do not see it on the front end.
1
2// Hide the front-end admin bar for everyone except administrators.
3add_filter( 'show_admin_bar', 'acme_hide_admin_bar_for_non_admins' );
4
5function acme_hide_admin_bar_for_non_admins( $show ) {
6 if ( ! current_user_can( 'manage_options' ) ) {
7 return false;
8 }
9 return $show;
10}
11The code checks the manage_options capability instead of the role name, so it also works for custom admin roles. To keep the bar for editors too, change manage_options to edit_others_posts.
Hide it for specific roles
Use this version when you want to name the roles. Change the list to the role slugs on your site. WooCommerce uses customer and shop_manager.
1
2// Hide the front-end admin bar for chosen user roles.
3add_filter( 'show_admin_bar', 'acme_hide_admin_bar_by_role' );
4
5function acme_hide_admin_bar_by_role( $show ) {
6 $hidden_roles = array( 'subscriber', 'contributor', 'customer' );
7 $user = wp_get_current_user();
8
9 if ( array_intersect( $hidden_roles, (array) $user->roles ) ) {
10 return false;
11 }
12 return $show;
13}
14A user can have more than one role. The array_intersect() check hides the bar if any of the user's roles is on the list. The show_admin_bar filter reference on developer.wordpress.org has the full details.
Hide it for specific users
To hide the bar for a few named accounts, list their user IDs. To find an ID, go to Users > All Users, hover over the user's Edit link and read the number after user_id= in the link at the bottom of your browser.
1
2// Hide the front-end admin bar for chosen user IDs.
3add_filter( 'show_admin_bar', 'acme_hide_admin_bar_for_users' );
4
5function acme_hide_admin_bar_for_users( $show ) {
6 $hidden_ids = array( 2, 4 ); // Replace with your user IDs.
7
8 if ( in_array( get_current_user_id(), $hidden_ids, true ) ) {
9 return false;
10 }
11 return $show;
12}
13Hide it for everyone
One line turns the front-end bar off for every user, administrators included:
1
2add_filter( 'show_admin_bar', '__return_false' );
3Older tutorials call show_admin_bar( false ) on the after_setup_theme hook. That still works, but the filter is the cleaner way, because it does not change the stored value and other code can still read the real setting.
How to Hide the Admin Bar Without Code
To hide the admin bar without code, install the free Admin Bar Editor plugin by Pixar Labs and use the switch on its Frontend tab to disable the front-end bar for all logged-in users. To hide the bar for chosen roles or usernames only, or to hide single items per role, you need Admin Bar Editor Pro.
When WP Adminify is active, the editor sits under WP Adminify > Adminbar Editor, with three tabs: Backend, Frontend and Advanced. The Frontend tab holds the hide settings for the live site. The free plugin also lets you switch off single items, such as the WordPress logo or the comments counter, for all users.
The Pro version of this WordPress admin toolbar plugin adds rules by role and by username. You can hide the whole front-end bar for subscribers and customers, for example, and keep it for your team. Each item also gets a Hidden For Rules field, where you type a role or a username to hide just that item from those people.

Hiding single items is often a better answer than hiding the whole bar. An editor may still want the Edit link and the New button, but not the updates counter or plugin shortcuts.
Can You Hide the Admin Bar Inside wp-admin?
Not with a setting. WordPress always shows the admin bar inside wp-admin, and the Profile checkbox and the show_admin_bar filter only work on the front end. The only way to hide it in the dashboard is custom CSS, and that also removes the account menu and the Log Out link.
If you still want to do it for a role, this snippet hides the bar in wp-admin for users who are not administrators and removes the empty space WordPress leaves at the top:
1
2// Hide the admin bar inside wp-admin for non-administrators (CSS only).
3add_action( 'admin_head', 'acme_hide_admin_bar_in_dashboard' );
4
5function acme_hide_admin_bar_in_dashboard() {
6 if ( current_user_can( 'manage_options' ) ) {
7 return;
8 }
9 echo '<style>#wpadminbar { display: none; } html.wp-toolbar { padding-top: 0; }</style>';
10}
11Give those users another way to log out, for example a link in the admin menu or on a dashboard widget. A cleaner option is to keep the bar and remove the items they do not need.
Hiding the Admin Bar vs Hiding Admin Menu Items by Role
Hiding the admin bar removes the dark strip at the top of the screen. Hiding admin menu items by role removes entries from the left sidebar inside wp-admin, such as Tools or Comments. Many people search for one when they need the other, and the two jobs use different settings and different code.
If your goal is a shorter sidebar for editors or clients, read our guide on how to remove and reorder WordPress admin menu items. It shows the menu editor way and the code way. Hiding the admin bar on the front end also does not protect wp-admin. To keep users out of the dashboard, see our fixes for wp-admin redirects to the homepage.
Frequently Asked Questions
How do I hide the admin bar for all users except admins?
Add a function to the show_admin_bar filter that returns false when current_user_can( 'manage_options' ) is false. Administrators keep the bar and every other role loses it on the front end. Put the snippet in a small custom plugin or a code snippet manager so a theme update does not remove it.
Why does the admin bar still show in the dashboard?
WordPress always shows the admin bar inside wp-admin for logged-in users. The Show Toolbar when viewing site option and the show_admin_bar filter only control the front end. Hiding the bar in the dashboard needs custom CSS, which also removes the account menu and the Log Out link.
Does hiding the admin bar stop users from reaching wp-admin?
No. Hiding the bar only removes the shortcut strip. Users can still type /wp-admin/ into the browser and open any screen their role allows. To keep a role out of the dashboard, use a redirect rule or change the role's capabilities instead.
How do I hide the WordPress admin bar for subscribers?
Add the role-based show_admin_bar snippet from this guide with subscriber in the list of hidden roles. Without code, Admin Bar Editor Pro can hide the front-end bar for the subscriber role. For a single subscriber, untick Show Toolbar when viewing site in that user's profile.
Is hiding the admin bar bad for SEO or speed?
No. Visitors who are not logged in never see the admin bar, and search engines crawl the site as visitors. Hiding the bar only changes what logged-in users see. It saves a small amount of CSS and JavaScript for those users, but the effect on page speed is minor.
Final Thoughts
To hide the WordPress admin bar for one person, untick one box in their profile. To hide it for a role, a five-line show_admin_bar filter does the job, and the manage_options check keeps it for administrators. If you would rather not touch code, the Admin Bar Editor plugin has a free front-end switch and Pro rules for roles and usernames. All of these methods hide the bar on the front end only.
Before you hide the bar completely, ask whether a shorter bar would do. Our guide How to Customize the WordPress Admin Bar (Toolbar) shows how to remove, add and reorder single items for each role.


