◦ Comprehensive security
◦ Support
WordPress Guide → Admin → Hide WordPress Admin Bar
How to hide the WordPress admin bar
Trying to clean up the frontend of your site or simplify things for non-admin users? Let’s walk through a few easy ways to hide the WordPress admin bar—no matter who you want to hide it from.
Get fast, reliable hosting for WordPress
Power your site with the industry’s fastest, most optimized WordPress hosting
What is the WordPress admin bar?
The WordPress admin bar is the dark toolbar that appears at the top of your screen when you’re logged into a WordPress site. You’ll see it while viewing the frontend of your website and when navigating the WordPress dashboard.
By default, it includes links to the dashboard, new post creation, updates, profile settings, and any plugin-specific menus that hook into it.
Change visibility from the user profile
WordPress includes a built-in option to hide the toolbar on the frontend, but it only applies on a per-user basis.
To hide the admin bar for a specific user:
- In the WordPress dashboard, go to Users > All Users.
- Click Edit under the user you want to modify.
- On the profile page, uncheck the box labeled “Show Toolbar when viewing site.”
- Scroll down and click Update User to save the changes.
This method is quick but not scalable—ideal if you only need to change the setting for one or two people.
Hide the admin bar for all users except administrators
If you want to automatically hide the toolbar for everyone except admins, a small code snippet does the trick.
To implement this:
- Go to Appearance > Theme File Editor (or use FTP/SFTP or a child theme if editing safely).
- Open your functions.php file.
- Add the following code at the bottom:
if (!current_user_can(‘administrator’)) {
add_filter(‘show_admin_bar’, ‘__return_false’);
} - Save the file.
Now only administrators will see the admin bar on the frontend. Everyone else gets a cleaner view with no toolbar.
Alternative: Use the Code Snippets plugin to add this safely without editing theme files directly.
Hide the admin bar for everyone
Want to remove the toolbar entirely, for all users including admins? Use this variation:
add_filter(‘show_admin_bar’, ‘__return_false’);
Add this to your functions.php file or a code snippet plugin. It disables the admin bar sitewide on the frontend, regardless of role or user.
This is helpful for locked-down client sites or designs where you want complete frontend control.
Hide the admin bar for specific user roles
For sites using custom roles or more granular permissions, you can hide the toolbar based on user role.
Here’s how:
function hide_admin_bar_for_roles() {
if (current_user_can(‘editor’) || current_user_can(‘subscriber’)) {
show_admin_bar(false);
}
}
add_action(‘after_setup_theme’, ‘hide_admin_bar_for_roles’);
You can customize the current_user_can() checks to include any role(s) you want. This gives you full control over which types of users see the admin bar.
Hide the admin bar for specific users
If you only want to hide the admin bar for one or two user accounts, use the user ID to target them.
Example:
function hide_admin_bar_for_specific_users() {
if (get_current_user_id() === 5) {
show_admin_bar(false);
}
}
add_action(‘after_setup_theme’, ‘hide_admin_bar_for_specific_users’);
To find a user’s ID:
- Go to Users > All Users
- Hover over the username and look at the URL in the bottom of your browser—it’ll include user_id=5 or similar
You can modify the condition to target multiple IDs with an array if needed.
Use the Hide Admin Bar Based on User Roles plugin
If you prefer not to deal with code, the Hide Admin Bar Based on User Roles plugin offers a quick and user-friendly way to control who sees the admin bar.
Here’s how to use it:
- In your WordPress dashboard, go to Plugins > Add New.
- Search for “Hide Admin Bar Based on User Roles”.
- Click Install Now, then Activate.
- Go to Settings > Hide Admin Bar Settings.
- You’ll see a list of all user roles on your site. Just check the box next to any role you want to hide the admin bar from.
- Click Save Changes.
This plugin disables the admin bar on the frontend only, which is exactly what most site owners want. It’s especially helpful on client sites, membership communities, or contributor-heavy blogs where only admins need access to the full dashboard.
Hide the admin bar on specific pages or templates
Need to show the admin bar in general, but remove it from certain pages? WordPress conditionals make that easy.
Example: hide the admin bar on the homepage only:
function hide_admin_bar_on_homepage() {
if (is_front_page()) {
show_admin_bar(false);
}
}
add_action(‘after_setup_theme’, ‘hide_admin_bar_on_homepage’);
You can use any standard WordPress conditional tags like is_page(), is_single(), or is_page_template() to target specific content types or templates.
This approach works great when you’re designing landing pages or previews where the admin bar could break layout or be distracting.
Should you hide the admin bar? Pros and cons
Before removing the toolbar, it’s worth thinking through how your users actually interact with WordPress.
Why hide it:
- Cleaner frontend design for logged-in users
- Prevent distractions for non-admins or clients
- Limit access to dashboard or plugin functions
Why keep it:
- Quick access to dashboard, edits, and new post links
- Useful for site editors and contributors
- Some plugins rely on it for frontend shortcuts
If you’re running a membership site, client site, or a minimalist theme, hiding the toolbar makes sense. But for collaborative publishing teams or frequent content editors, the convenience may outweigh the clutter.
Next steps for hiding the WordPress admin bar
Removing the WordPress admin bar is a simple way to control frontend appearance and reduce distractions for non-admin users. Whether you’re managing a client site, a membership platform, or just want a cleaner design, there’s a method here that fits.
Start with the built-in user profile setting or add a quick snippet to your theme. For broader control, go with a plugin to manage roles and visibility with less risk.
Ready to upgrade your WordPress experience? Professional hosting improves speeds, security, and reliability for a website and a brand that people find engaging and trustworthy.
Don’t want to deal with server management and maintenance? Our fully managed hosting for WordPress is the best in the industry. Our team are not only server IT experts, but WordPress hosting experts as well. Your server couldn’t be in better hands.
Click through below to explore all of our hosting for WordPress options, or chat with a WordPress expert right now to get answers and advice.
Additional resources
How to use your WordPress admin login page →
How to find, use, and troubleshoot your admin page
WP-content: uploads and more (a beginner’s guide) →
Learn how to manage and troubleshoot WordPress media uploads through the wp-content/uploads directory.
Easy WordPress website maintenance tips →
7 simple steps to keep on regular rotation