Skip to content

How to hide the WordPress Admin ToolBar?

hide-admin-toolbar-of-wordpress

Are you looking to hide the admin toolbar from your WordPress site? Tell me, how many people are so annoyed with the admin toolbar?

When you get logged in to your WordPress site you will see a black layer on the header displaying certain options. Sometimes you get annoyed with these options and think of how to get rid of those options or remove the black layer on the header area.

Well, this black layer is quite useful to go back and forth to access to your WordPress dashboard and make quick changes on your WordPress site.

But for some, it feels like a dent on the beautiful homepage design and layouts that they have designed on their site. So, they think of removing the option from their site.

In this article, I will show you how you can hide the admin toolbar from your frontend. I have mentioned different steps that you can follow that suit your needs.

So, let’s dive in and check out some of the steps to hide the admin toolbar from your WordPress site.

What is an admin toolbar?

admin-toolbar

If you are new to WordPress then you should understand the use of Admin ToolBar displayed on your site. The admin toolbar is the topmost section of your webpage with a black layer that displays some links. These links when clicked will redirect you to make certain changes or perform certain actions on your site.

For instance: You can hover on the name of your website where you can find some options in the dropdown. You can click on the Dashboard to redirect to your WordPress Admin Dashboard.

If you click on Themes it will redirect you to the backend Appearance >> Theme section. Additionally, you can also see widgets and menus to redirect to the relevant backend section of your WordPress site. You may find many options on the admin toolbar where you can easily make quick changes as per your needs.

How to remove the admin toolbar?

Generally, you can remove or hide the admin toolbar in different ways.

The first step is you can manually disable the toolbar from the backend of your site via user settings.

Secondly, if you are good with CSS then you can use custom CSS to hide the admin toolbar.

Thirdly, WordPress has tons of plugins for every use so you can use a WordPress plugin to hide the admin bar from your site.

Finally, If you are a developer then you can easily add code on your PHP file and hide the admin bar from your site.

The above steps are easy and can be easily implemented by WordPress Beginners. You can follow any step and hide the admin toolbar from your site.

Hide admin toolbar via user settings.

disable-toolbar-via-user-settings

To hide the admin tool from WordPress frontend you need to first login to your WordPress admin dashboard.

Once you get logged in you need to navigate to Users >> All Users and edit the user for which you need to hide the admin toolbar.

Now, you can find the option Toolbar under Keyboard Shortcuts and uncheck the option to Show Toolbar when viewing the site.

With this option disabled you can hide the admin toolbar from your site. Moreover, you can see the option on the backend without any issue.

Since as an admin of the site you should leave the option as it is. Because for admin it has some important links which will give quick access to the changes that you need.

Hide admin toolbar using custom CSS

This is a quick and easy method for web designers if they need to hide the admin toolbar from the frontend. You can add below CSS on the backend of your WordPress custom CSS option.

You need to add the below CSS by navigating to Appearance >> Customize >> Additional CSS. Finally, after adding the CSS, the admin toolbar will get removed from your site frontend. 

// Hide Admin ToolBar from frontend

#wpadminbar { display:none !important;}

Hide admin toolbar using WordPress Plugin

hide-admin-toolbar-using-plugin

This is one of the simplest methods which you can find to hide the admin toolbar from your site. You can install the Hide Admin Bar plugin and activate the plugin.

There are no configuration settings that you need to configure. Activate the plugin and the admin toolbar will be gone from your site frontend.

Similarly, if you need to hide the admin toolbar for certain users then you can install Admin Bar Disabler. With this plugin activated you can configure settings on your WordPress admin dashboard.

Navigate to Settings >> General settings option and you can check to whom the admin toolbar gets hidden. Although this plugin didn’t get updated from the past several months and not tested with the latest WordPress version I recommend that you can avoid the usage of this plugin. 

You may find many similar plugins to hide the admin toolbar on your site. Please make sure that the plugin is compatible with the latest version of WordPress and is popular in use.

Hide admin toolbar using PHP code

Finally, you can hide the admin toolbar by writing a small piece of code on your PHP file. If you are a developer then you can easily do that with no issues.

But for a WordPress Beginner, it might be a little tricky since you don’t have any experience with coding. You can copy the below code and paste it on your functions.php file located in the root folder if your theme. By applying this code it will hide the admin toolbar from the WordPress frontend site. 

// Hide Admin ToolBar for all users.

add_filter(‘show_admin_bar’, ‘__return_false’); 

Since you are the admin of the site then you need the admin toolbar to make quick changes. So, If you want to allow the users with administrative privileges to see the toolbar, you should just add the below code instead. This will hide the admin toolbar for all the users except the admin privileges users.

// Hide Admin ToolBar for all users except admin(s)

 if ( ! current_user_can( ‘manage_options’ ) )

 {  show_admin_bar( false ); 

That’s it once you paste the code in the functions.php file your job is done. You can hide the admin toolbar from your WordPress easily. 

Conclusion

In my opinion, you should keep the admin toolbar for your quick settings and changes.

Whether you think the toolbar is affecting your design or find it distracting, you can completely remove it whenever you want.

I hope you found this article interesting and helpful.

Finally, I would like to ask you which method you are preferring to hide the admin toolbar?

Do you think that it is necessary to remove the toolbar? I would love to hear your thoughts and suggestions.

Please share this post on Facebook and Twitter if you liked it until then have a great day. Take care 🙂

Leave a Reply