Whenever you log in to your WordPress website, an admin toolbar is displayed on the top of the page containing useful quick links that you can use for various purposes such as creating or editing new posts, pages, and many more.
However, it might be useful for some people, but for some, it might be distracting. There might be several reasons for distraction; for example, if you are a WordPress editor and designing a page, you might be observing every aspect of the page and the admin bar may be distracting you, and you would be wondering how to remove the admin toolbar from the top of the page
So don’t worry. In this guide, we will be showing you 4 ways How to Disable WordPress Admin Toolbar
What is the WordPress Admin Toolbar?
An admin toolbar is the very first section of your screen that shows administration links.
Basically, using this admin toolbar, you can create a new page, post, media, edit your profile, and if you are on the frontend of your website, you can even visit the dashboard through this admin bar.
Now, there are several ways of disabling the admin toolbar, and we will be showing you different methods for disabling them
1) Disable WordPress Admin Toolbar via Dashboard
WordPress allows you to disable the admin toolbar by simply visiting your user profile, and there you can also disable it. Don’t worry; we will be showing you how to disable the admin toolbar via the dashboard step by step
Since you logged in to your WordPress site and are on the dashboard, click on Users and then select All Users.
As you have clicked on All users, so all the Users will be displayed that is available on your website
If your role is an administrator, you can edit any profile, but for now, you are disabling the admin toolbar for yourself, so hover over your profile and click on the edit.
Now, scroll down, and you will see a toolbar and a checkbox in front of it. If it’s checked, then uncheck it.
After successfully unchecking to admin toolbar, scroll down to the bottom of the page and click on Update Profile.
The admin toolbar is now successfully disabled.
You can also go directly to your profile by clicking on Users and then Profile
If you want to disable the admin toolbar for yourself, then the above method is quite handy, but if you want to disable the admin toolbar for all users, then going over all the Profiles/Users and unchecking the admin toolbar checkbox that will take a lot of time.
So, installing a plugin for disabling it is another handy method, and you don’t have to manually disable the admin toolbar for every User ( Who are logged in)
2) Disable WordPress Admin Toolbar Using a Plugin
Installing a plugin for disabling the admin toolbar is another useful method since you can disable the admin toolbar for every User at once without having manually disabling it for every User ( Who are logged in)
There are many plugins for disabling the admin toolbar, but one of the most popular plugins is Hide Admin Bar.
All you need is to install and activate it simply, and the admin toolbar will be successfully removed for all the Users
Another most used plugin is admin bar disabler.
This plugin disables the WordPress admin toolbar and either Blacklist or white list it for specific User roles. Once you installed this plugin, head over to setting > Admin bar disabler and customize it according to your desired requirements.
There are many other plugins for disabling the admin toolbar, but we can’t explain each and every plugin since the working procedure for most of the plugin are the same as we have mentioned above
If you don’t want to disable the WordPress admin toolbar using a plugin, then we also have another method for disabling it with custom code
3) Disable the WordPress Admin Toolbar with Custom Code
WordPress admin toolbar can also be easily removed with custom code. If you are a WordPress developer, you would probably like to do stuff without using a plugin because many plugins installed on your site might slow down your website performance. So to disable the admin toolbar for all of the Users then you have to simply insert this piece of code in the functions.php file.
add_filter('show_admin_bar', '__return_false');
functions.php file is located in Appearance > Theme Editor
But if you want to disable the admin toolbar for every User except Administrator then add this piece of code in the functions.php file
add_action('after_setup_theme', 'remove_admin_bar'); function remove_admin_bar() { if (!current_user_can('administrator') && !is_admin()) { show_admin_bar(false); } }
There is also a simplest method for disabling the admin toolbar using CSS code, and it will disable the admin toolbar for everyone
Read also: How to Check if User is Admin in WordPress
4) Disable the Admin Toolbar using CSS code
Simply go to Appearance > Customize > Additional CSS and then add this code there.
#wpadminbar { display:none !important;}
If there is a white gap above the header of your website then add this code to remove the gap
html{ margin-top:0px !important; }
if you have enabled sticky navigation on your site then also add the following code
nav#site-navigation{ margin-top:0px !important; }
Conclusion
That concludes our discussion. The WordPress admin bar will no longer bother you. We demonstrated how to do it in 4 simple ways. Now that you’ve gotten rid of all the distractions, go ahead and create some amazing WordPress sites.
If you have any more queries about how to turn off the WordPress Admin Toolbar, please leave a comment below and we will be happy to assist you.