The WordPress Admin Bar (or Toolbar) is a quick-access strip for logged-in users, providing links to the dashboard and settings. It’s super handy for administrators who manage the site. However, for users with fewer permissions, such as Subscribers or Customers, it’s just confusing clutter. Removing this bar for non-admins is a smart move in site management. It boosts security, makes the site easier to use, and keeps your design looking right.

Why Hide the WordPress Admin Bar for Non-Admins?
Hiding the Admin Bar when users don’t need it isn’t just about looks. It’s a key step for better security and a smoother user experience.
A Cleaner User Experience (UX)
The primary reason for hiding the Admin Bar is to provide users with a cleaner view of the site. For people like subscribers or shoppers, the bar clutters the screen and makes the site feel less professional. If your site’s job is selling, reading, or getting people to sign up, backend tools distract them from the goal.
Removing the bar also takes away pressure on non-technical users. When they see a tool they don’t recognise, they often click it, assuming they should interact with it. Hiding the bar tells them they are in a viewing or buying area. This simple move cuts down on confusing questions to your support team and makes the interface simpler and more focused.
Security and Access Control
While the WordPress Admin Bar doesn’t give non-admins new powers (their user role still blocks access), seeing it is like a sign telling them to explore the admin area. Even if a non-admin clicks an admin link and gets an error, that’s a bad, frustrating experience.
Disabling the Admin Bar for non-admin roles creates a visual filter. It helps site owners stop users from trying to access features outside their allowed limits. This acts as a basic layer of security, keeping the site well-managed and preventing users from clicking options they don’t understand, which could lead to accidental site errors.
Visual Consistency on the Frontend
The Admin Bar is useful for admins and developers, but it pushes all frontend content down by about 32 pixels. This vertical shift can mess up your site’s design, especially for things like sticky navigation bars, menu placement, or important content near the top of the page.
Hiding the toolbar ensures that non-admin users, such as customers or clients, can view the correct, finished layout without the visual block. This ensures the design remains consistent, ensuring the website appears professional for every user type, particularly when the goal is reading or conversions.
Method 1: Manually Hiding for Individual Users (The Profile Setting)
WordPress has a setting right in the user profile that lets admins hide the Admin Bar for any single user. This is very easy to do, but it isn’t scalable for sites with lots of users.
Navigating to User Profiles
To manually turn off the Admin Bar for one user, an administrator needs to do this:
- Log in to the WordPress admin dashboard.
- Go to the Users » All Users page.
- Hover over the user you want to change and click Edit.
Unchecking the ‘Show Toolbar’ Option
Once you’re on the user’s profile:
- Find the section called “Personal Options.”
- Uncheck the box next to the option ‘Show toolbar when viewing site’.
- Scroll down and click the ‘Update User’ button to save it.

You must repeat this exact process for every single user you want to hide the Admin Bar for.
When This Method is Best
Since you have to change each profile one by one, this method doesn’t work for big membership sites or sites where user roles change often. It’s really only good for quick exceptions. If you have a code snippet or global plugin doing the main work, this manual setting is a fast way to override it for one person. For example, if a specific Contributor needs the bar gone even though the general policy keeps it on, this profile setting is the fastest fix without touching the global setup.
Method 2: The Code Snippet Approach (For Developers)
For developers and site owners focused on speed and zero plugin load, adding the feature via PHP code snippets is the most efficient long-term way. This method uses WordPress hooks and rules to control visibility based on what the user is allowed to do.
Prerequisites: The functions.php File or a Code Snippet Plugin
Where you put custom PHP code matters a lot. The most common place is your theme’s functions.php file. But editing this file directly is risky, one small mistake can cause the White Screen of Death (WSOD), forcing you to use FTP to fix it. Plus, if you update your theme, you lose the code unless you use a child theme.
The best way to add custom code is by using a dedicated Code Snippet plugin (like Code Snippets). This keeps the code separate from your theme, so it stays put when you update the theme. It also gives you a safe dashboard area to manage, activate, and deactivate each code block like a mini-plugin without the extra burden.
Code Snippet to Hide for All Non-Administrators
The code below runs early in the WordPress loading process. It checks two key things: if the user is NOT an administrator (!current_user_can(‘administrator’)) AND if they are NOT currently viewing the admin dashboard (! is_admin()). This keeps the bar visible when non-admins are in the dashboard area, but makes it disappear on the frontend.
<?php
/**
* Hide WordPress Admin Bar for all users except Administrators.
*/
add_action('after_setup_theme', 'remove_admin_bar_for_non_admins');
function remove_admin_bar_for_non_admins() {
// Check if the current user is NOT an administrator AND is viewing the frontend
if (!current_user_can('administrator') &&! is_admin()) {
show_admin_bar(false);
}
}
?>
The command show_admin_bar(false); is the key line that tells WordPress to stop showing the Admin Bar.
Code Snippet to Hide for Specific Roles (e.g., Subscribers)
If you need some non-admin roles (like Editors) to keep the Admin Bar, but customer roles (like Subscribers) should never see it, you must target the roles exactly. This code checks the user’s role list for precise control.
<?php
/**
* Disable Admin Bar specifically for users with the 'subscriber' role.
*/
function disable_admin_bar_for_subscribers() {
$user = wp_get_current_user();
// Check if the current user has the 'subscriber' role
if (in_array('subscriber', $user->roles)) {
show_admin_bar(false);
}
}
add_action('after_setup_theme', 'disable_admin_bar_for_subscribers');
?>
Method 3: The Zero-Code Plugin Solution
If you want to manage user interfaces centrally without touching code, a specific plugin is the easiest way to go. This approach works well for sites of any size and has very little risk compared to editing files.
Choosing the Right Plugin
The best plugin depends on how much control you need. Some plugins just have a simple button that says “hide for everyone who isn’t an admin.” Others, like Adminimize, let you precisely control every dashboard part based on user roles.
Step-by-Step Plugin Installation and Activation
Using a plugin is the standard, safest way to do this.
- Go to the Plugins menu in the WordPress dashboard and click Add New.
- Search for the plugin you want (e.g., Hide Admin Bar from Non-Admins or Adminimize).
- Click Install Now, and when it finishes, click Activate.

For super lightweight plugins, like Hide Admin Bar from Non-Admins, the job is often done right after activation. These plugins hide the toolbar for all users who aren’t administrators without needing any extra setup.
Configuring Visibility by User Role
If you run a site with many authors or clients where some non-admin roles (like Editors) still need the Admin Bar, a strong role-based tool like Adminimize is a good choice. This plugin lets you customise the entire administration backend, giving you precise control over what each user sees.
To hide the Admin Bar using Adminimize:
- Go to Settings » Adminimize in the Dashboard.
- Find or navigate to the Global Options section.
- In Global Options, find the setting that controls the Admin Bar (Toolbar) visibility.
- Check the boxes next to the user roles (like Subscriber, Contributor) that should not see the Admin Bar at all.
- Click the ‘Update Options »’ button at the bottom to save the changes.
This setup gives you one clear place to manage display preferences across the site, making sure things stay consistent and easy to adjust later.
Recommended Plugins: Hide Admin Bar from Non-Admins, Adminimize
- Hide Admin Bar from Non-Admins: This plugin is best for simplicity and speed. It’s tiny—just a few lines of code—and automatically hides the WordPress Toolbar for anyone who isn’t an administrator. It’s perfect for sites where only the main admin needs access and needs zero configuration.
- Adminimize: This is the tool for complex setups. You can hide the entire Admin Bar in the Global Options. Plus, you can hide specific items inside the Admin Bar (like the comments icon or the ‘New’ menu) for certain roles using the Admin Bar Options section. This level of fine-tuning means that even if a non-admin keeps the bar, they only see what they need for an efficient workflow.
Best Practices for Adding Custom Code
When adding custom features, always think about safety and maintenance. Putting code directly into functions.php ties that code to the theme. Using a specialised plugin to deploy the code snippets makes the setup more stable and upgrade-proof. If something goes wrong, you can turn off the snippet instantly from the dashboard, cutting down on downtime and keeping you out of the server files. This separation is vital for long-term site stability.
Troubleshooting: Admin Bar Still Visible?
If you check your settings or code and everything looks right, but the Admin Bar is still there for non-admins, the problem is almost always with something outside the code itself.
Clear Your Caches
Caching is the number one reason the Admin Bar stays visible. If a caching tool serves up a static page version—one that was created before the bar was hidden—the bar will show up no matter what the user’s role is.
You need to clear caches everywhere:
- Browser Cache: Clear your browser’s cookies and cached data.
- Plugin Cache: Use the “Purge All” or “Delete Cache” option inside any performance plugins you run (like WP Rocket, LiteSpeed Cache).
- Server/CDN Cache: If you use server-side caching (like Varnish) or a CDN, you must clear those external caches too. You may need to ask your hosting provider for help.
Crucially, strong caching systems must be set to exclude logged-in users from being cached. This allows WordPress to run its dynamic checks, like current_user_can(), correctly on every authenticated request, so the page renders based on the user’s role.
Verify User Roles and Capabilities
A visible Admin Bar might mean the user’s role has accidentally been given administrator powers by another plugin (like a role editor).
To figure this out:
- Log in as the user who shouldn’t see the bar.
- Confirm their assigned role in the Users list.
- Check if they can access dashboard areas normally blocked for non-admins. If they can, their user capabilities are wrong, and the code or plugin designed to exclude non-admins won’t work on them.
Check for Plugin Conflicts
In complicated WordPress setups, one plugin (like a membership tool or a theme) can override the code that hides the Admin Bar.
If caching and user roles are correct, you need to check for conflicts:
- Deactivate all plugins temporarily, except the one that’s supposed to be hiding the bar (or remove the custom code snippet for now).
- If the Admin Bar disappears, reactivate the other plugins one by one, testing after each one, Continue until you identify the problematic plugin. You can then replace or adjust the conflicting plugin’s settings.
Conclusion: A More Streamlined WordPress Site
Putting in the effort to hide the WordPress Admin Bar for non-admin users is worth it for better site management, security, and user happiness. By removing distractions from the front end, site owners give a more professional experience, helping users focus only on the content, their tasks, or sales.
For a fast fix, the zero-code plugin method (especially the light Hide Admin Bar from Non-Admins) works immediately. But for sites that need the most speed and control, the code snippet approach, added safely through a dedicated Code Snippet plugin, is the ideal professional choice. This method hits the role-based restrictions with almost no speed impact, stays in place through updates, and provides a secure place to manage your custom code. Getting rid of unnecessary admin tools makes sure every user sees exactly what they need—and nothing they don’t.
