Controlling the visibility of the WordPress admin bar helps create a personalized workspace. It surely improves the overall user experience as well.
Whether you want to streamline the interface for certain user roles or hide it from specific users, customizing the admin bar can significantly enhance usability.
If you want to make the admin bar user friendly by hiding it for user roles customization is your only choice. While you can also hide it for specific users to make it further optimized, but by default you don't have the option to do so.
Today I’m going to show you how to hide admin bar based on user roles or specific users in WordPress. I’ll explain everything step by step. So it'll be easy to follow for everyone.
Why Should You Hide the Admin Bar?
The admin bar is an interesting and helpful option for WordPress site owners. You can use it for adding content, changing settings or something else. Also, you can get very basic role based control.
But if you want advanced role based control or provide less access to other roles, you should hide the admin bar. You can do to to take extra precautionary measure.
Here are a few reasons why you should hide the admin bar in WordPress:
- Messy Dashboard Interface: The default admin bar can make the interface look messy and confusing. If you prefer a clean dashboard, this surely is distracting.
- Performance Issues: Websites with a large number of plugins, the admin bar can slow down page load times. This is frustrating for users trying to manage their sites efficiently.
- User Confusion: For beginners, the admin bar might be confusing. They might not understand what each icon and link does. So, it creates major confusion among them.
- Limited Use for Certain Roles: Default roles like editors or contributors offer features that are irrelevant to their tasks. This makes it useless for their specific needs.
How to Hide Admin Bar Based On User Roles or Specific Users in WordPress using a Plugin
You can easily hide the admin bar in WordPress using plugins. With additional customization option the Admin Bar Editor gives you such flexibility free of cost.
Here's how to hide the admin bar based on user roles or specific users using the Admin Bar Editor plugin.
Step 1: Install the Admin Bar Editor Plugin
Download, Install, Activate: Start by downloading and installing the free Admin Bar Editor plugin from the WordPress plugin repository. You can directly download the plugin here.

Once installed, activate the plugin.
Step 2: Access the Admin Bar Editor
Go to WordPress dashboard and find the "Admin bar Editor" option. Click on "Admin bar Editor" to open the panel.
Here you will find two options: Backend and Frontend.
Hide Backend Admin Bar Items
Toggle Visibility: In the Backend section, you will see a list of admin bar items with switches next to them. Flip the switch of any item you want to hide.
Save Settings: After selecting the items to hide, save your settings.

Additional Customization:
Expand Items: Click on any item to expand it. Now, you can rename items, change icons and set visibility based on user roles.
User Role Customization: You can hide items for specific user roles. Just use the provided options to set these preferences.
Hide Frontend Admin Bar Items
Click on the "Front end" tab in the Admin bar Editor panel.
Just like the Backend section, flip the switches for any items you want to hide on the frontend.

Disable Frontend Admin Bar:
Enable the "Disable Front end Admin Bar" option. Now two options will appear: "Hide Admin Bar for All Users" and "Hide Admin Bar for All Guest Users."
The name itself describe what it does so, you do what you need to do.
Dynamic Hiding:
Use the "Disabled For" option below to hide the admin bar for specific user roles dynamically.
You can also hide the admin bar for specific usernames by selecting "user name" instead and choosing the desired usernames.

Hide Admin Bar Based On User Roles
Now, time to hide the admin bar for specific user roles. Add the following code to your theme’s functions.php file:
This code checks if the current user based on mentioned roles and hides the admin bar.
We know how important it is to manage role based visibility of the admin bar. But, so is the security of your WordPress dashboard.
We have shared a new article on: How WP-Admin Redirects to Homepage & Hide Login URL?. Here you can learn to to protect your site’s backend by redirecting the WP-Admin page to the homepage and hiding your login URL.
Hiding the Admin Bar for Specific Users
You can also hide the admin bar for specific users. All you need to do is use their user ID to do so. Here's the code you can follow:
Note: Replace 2, 4 with the user IDs for whom you want to hide the admin bar.
Do You Know? You can optimize your WordPress dashboard by hiding default admin notices.
Check out How to Permanently Hide Admin Notice in WordPress?. In this article we shared a straightforward solution to keep your dashboard clean and distraction-free.
How to get the User ID?
Just navigate to the Users Page in your WordPress Dashboard. Hover on the “Edit” option for that user for whom you like to hide the admin bar. Take a look at the following screenshot and you will get the ID marked by an arrow sign.

Conclusion
Customizing the visibility of the admin bar based on user roles or specific users can greatly enhance the user experience on your WordPress site.
So, now you know, how to hide admin bar based on user roles or specific users in WordPress. We have shared both methods with and without a plugin to do so. You can follow the mentioned code snippets if you're comfortable with codes. But don't forget to always back up your site before making changes to the code.
Otherwise, Admin Bar Editor helps you do it without messing with the codes. So, use it and enjoy the ultimate customization freedom for your WordPress dashboard!
Frequently Asked Questions (FAQs)
Will hiding the admin bar affect my site’s front-end or performance?
No it will not. Hiding the admin bar doesn’t change your actual content or theme layout. It just prevents WordPress from giving out the admin bar HTML and its CSS. In fact, on sites with many plugins or logged-in users, disabling the bar can slightly improve load times because fewer scripts and styles are loaded. The change only applies to logged-in users who meet the conditions you set. Your public site will remain the same.
Where do I find a user’s ID to hide the admin bar for them?
Go to your WordPress Dashboard → Users → All Users. Hover over the “Edit” link of the user you’re targeting. Look at the bottom of your browser to see a link. The link will show something like user_id=2. That number at the end is the user ID you can place inside your code snippet or choose inside Admin Bar Editor. You don’t need a plugin to find user IDs.
Can I hide only certain items in the admin bar instead of removing the whole thing?
Absolutely. Admin Bar Editor doesn’t just turn the bar off. It lets you toggle each individual menu item. You can remove “Comments,” “Updates,” or any plugin’s shortcut from the bar while keeping “New Post” or your custom links. This is helpful if you want to simplify the interface for clients or contributors without removing useful shortcuts for admins.
What happens if I make a mistake editing the admin bar or adding code?
If you’re using a plugin like Admin Bar Editor, mistakes are low-risk because you can simply disable a certain setting or reset items. If you’re editing code, always make a full site backup first. You can add the snippet in a child theme or a small custom plugin so you don’t lose changes during theme updates. If something goes wrong, remove the snippet via FTP or your hosting control panel’s file editor. And your site will return to normal.
Why would I hide the admin bar for some roles but not for admins?
Admins typically need full access to tools and shortcuts in the admin bar, But roles like Editors, Authors, or Subscribers don’t. Hiding the bar for them makes their workspace cleaner to work with. Thus improving performance. It also adds a layer of security because fewer shortcuts mean fewer chances for misclicks or accidental changes.



