Want to have more granular control over user access and permissions on your WordPress site? A great starting point is learning how to hide the WordPress Admin Bar.
The WordPress admin bar toolbar provides convenient access to key administrative functions and content creation tools. However, it can sometimes get in the way of your design workflow by hiding elements of your website during the editing process.
More importantly, it can become a security vulnerability if unauthorized users gain access to functionalities they shouldn’t.
Fortunately, WordPress offers the flexibility to address this. You can choose to hide the admin bar entirely or selectively based on user roles.
This article outlines proven methods to disable the WordPress admin bar to improve your editing experience and website security.
What is the WordPress Admin Bar?
The WordPress Admin Bar is a floating toolbar that appears at the top of your website. It is essentially a shortcut menu for managing your site.
It provides quick and easy access to frequently used tools and features and allows you to perform tasks without navigating to the full dashboard.
With the Admin Bar, you can add new posts or pages, moderate comments, access your site’s settings menu, and much more, all from the front end of your website.
It gives you direct access to elements such as your dashboard, media library, plugins, themes, user profiles, and other quick links.
The Admin Bar is customizable. You can add or remove elements to suit your editing style.
Some WordPress plugins also extend their functionality by adding their own elements to the bar.
Why Hide the Admin Bar?
Here are some reasons to hide your WordPress admin bar and improve overall website functionality.

- Cleaner Design Preview: The Admin Bar can overlap design elements on your website. This can make it difficult to accurately preview the page. Hiding the admin bar provides a clear and unobstructed view of your site’s design.
- Enhanced Security: For users with limited permissions (like subscribers), the Admin Bar exposes functionalities they shouldn’t access. Hiding it reduces potential security risks and prevents accidental changes to your website.
- Improve Functionality: The persistent bar at the top can sometimes obstruct key website elements for logged-in users. It might cover up your navigation menu, search bar, or other interactive features. Hiding it creates a more focused experience.
- Control User Access: Hiding the Admin Bar can be a strategic way to manage user roles and permissions. By restricting access to certain functionalities, you maintain better control over who can make changes to your website.
Want to enhance website security? Here are the 6 best security plugins for WordPress.
How to Hide WordPress Admin Bar [Working Methods]
Let’s now look at easy methods to Hide the WP admin bar.
Before trying any of these methods, backup your website to keep your content and customizations safe. You can use a WordPress Backup Plugin to do this quickly.
Method 1 – Using PHP Code
The first way you can remove the WordPress admin bar is by adding a PHP code to your WordPress Theme File. The Theme File is a document containing the PHP code that controls various aspects of your theme’s behavior.
Now, from your WordPress admin dashboard, navigate to Appearance > Theme File Editor. From the Theme Files menu on the right, select the functions.php file.

There are two ways you can go about it:
- To hide the admin bar for all users
You can hide the admin toolbar for all users by adding the following PHP code snippet at the bottom of the file before the ?> closing tag in the code editor screen.
add_filter('show_admin_bar', '__return_false');

Once done, click Update File.
- To hide the admin bar for specific roles
You can disable it for specific user roles to gain more control over who has access to the admin bar. To do this, add the snippet below:
if (current_user_can(‘enter role here’)) {
add_filter('show_admin_bar', '__return_false'); }
You can also disable the admin bar for all non-admin users except specific admin users. For this, enter the code snippet below:
add_action('after_setup_theme', 'remove_admin_bar');
function remove_admin_bar() {
if (!current_user_can('enter role here') && !is_admin()) {
show_admin_bar(false); } }
Note: If you have a custom code PHP for your theme, before proceeding with this method create a child theme to keep the custom PHP intact even after the update.
Want to create a child theme on WordPress? Here are different ways to create a WordPress Child Theme.
Method 2 – Through User Permissions in WordPress Dashboard
You can control who has quick access to the admin toolbar through the dashboard.
Navigate to your WordPress dashboard and then to Users > All Users.
Then, click Edit under the user whose permissions you want to alter. Scroll down to find the Toolbar checkbox and uncheck it to hide it from non-admin users.

This method requires individual changes to each user’s permission. It is great if you have only a handful of users. However, it might be tedious to edit user permissions individually for larger website management teams.
Facing access issues on your website? Learn how to fix the ‘Sorry you are not allowed to access this page’ WordPress Error.
Method 3 – Using a Free Plugin
Using a plugin such as Hide Admin Bar Based on User Roles plugin is a good solution if method 1 and method 2 do not work for you.
Method 1 is a code-based solution whereas method 2 can be time consuming if you have a large theme. The plugin options give you a perfect in between by allowing you to change permissions in bulk without having to code.
From your WordPress dashboard, navigate to Plugins > Add New Plugin. In the search bar, look up “Hide Admin Bar Based on User Roles.” Once you find the plugin, Install and Activate it.

When the plugin is up and running, head to Settings > Hide Admin Bar Settings.
Now, you can edit permissions by checking the appropriate checkboxes. You can hide the admin bar for all users or specifically for different user roles. You can also hide it for guest users and blacklist certain user capabilities.

Did you know, you can disable those distracting Admin Notices on your WordPress dashboard? Here’s how:
Wrapping Up
You can use the methods outlined in this article to hide your WordPress admin toolbar to control access, enhance your website’s appearance, and improve user experience.
However, before implementing these methods, make sure you have a backup of your website and understand the implications for different user roles.
To supercharge your website with advanced functionalities and attractive visual elements, consider The Plus Addons for Elementor. This plugin offers a vast library of more than 120 widgets and extensions, allowing you to create dynamic and engaging website designs with ease.
Whether it’s to build advanced carousels, eye-catching animations, or custom forms, The Plus Addons for Elementor has got you covered!