How to Hide WordPress Admin Bar?

WordPress

What is the WordPress Admin Bar?

The Admin Bar is like your very own WordPress speed-dial for your website!

Only let me elaborate.

The Admin Bar is a 32px long toolbar at the top of your WordPress Admin Dashboard that is shown. If you have signed in, it will also show on the front end of your website.

Imagine this now. You’ve been on a design spree for 36 hours. You’re down to your last “reasonable” coffee cup. And so because of one bar hovering on top, you know all your work is fucked up.

How ticked off would you have been?

However, here’s the thing.

The WordPress Admin bar includes feature shortcuts that are available mainly from your dashboard. You should connect your favourite features to the Admin Bar, much like a speed-dial. This causes navigation between the dashboard and the website to be minimised.

For eg, if you’re using the Divi Theme, you can easily add a widget to it on the Admin Bar. Now you can directly view the theme from the Admin bar instead of going to the dashboard to make interface adjustments.

But if that’s beneficial, why would you want to get rid of it?

Next, that’s up!

Why Would You Want To Hide The Admin Bar?

There are two primary explanations why the Admin Bar would choose to be deleted or covered.

  • To limit unauthorised access and retain private access to your WordPress Admin Dashboard
  • To have a more detailed view of the architecture of your website,

Nodding in approval your head?

Good!

Here are our top three ways to hide the Admin Bar and it takes less than 1 minute to execute them both!

How To Hide WordPress Admin Bar Using The WordPress Dashboard

Let’s have something simple to start with.

Disabling it from the WordPress Dashboard is the fastest way to delete the WordPress Admin Bar!

This is how:

1. Switch to the “Howdy, (your name) part on top of the RHS.” Click on “Edit Profile”

WordPress-Admin-Bar-Howdy

2. An option called “Toolbar-Show toolbar when viewing the site” can be seen. This is allowed, by default, for all apps. Clicking on the box disables this.Show Tool Bar when viewing site option

Disable-Toolbar-Admin-Dashboard3. Now scroll down and click ‘Profile Check’

Update-Profile-Admin-Dashboard
For any device, the WordPress Admin Bar would no longer exist on the frontend.

How to Hide WordPress Admin Bar Using a WordPress Plugin?

The WordPress Repository has more than 15 plugins whose primary purpose is to hide the Admin Bar. We considered the Hide Admin Bar plugin to be the best, having checked them all out. It has over 40,000 downloads and is a one-step solution indeed!

All you have to do is instal and trigger the plugin into your WordPress account. And voila! When anyone enters the site, the Admin Bar is no longer available. You should easily deactivate the plugin to get the Admin Bar back.

Hide-Admin-Bar-Activate

The Stronger Admin Bar plugin is also another helpful plugin. You can select from the following options after you update it and trigger it:

  • Hide the Admin Bar for all users
  • Hide the Admin Bar for all users except Admin
  • Make the Admin Bar Opaque (you can also control the % of opacity) (you can also control the percent of opacity)
  • Hide the Admin Bar unless hovered on

Better-Admin-Bar-Options

We really respect an easy-to-use plugin that does its job well!

How to Hide WordPress Admin using Code?

Many individuals do not want to see so many plugins installed.

Don’t be concerned!

By changing the code in your functions.php file, you can delete the admin bar quickly.

Here’s what you ought to do here.

1. Switch from the WordPress Menu to Appearance.

2. “Choose an option for “Theme Editor. This will take you to the Theme Code.

Theme-Editor-Appearance-Dashboard

3. Open the folder functions.php now. “It is usually located on the right hand side of the list titled “Theme Files (see screenshot below).

Functions.php-Theme-Editor

4. Add the following code in the functions.php folder.

add_filter(‘show_admin_bar’, ‘__return_false’);

5. Now scroll to the bottom and press the Download File button.

The WordPress Admin Bar is now gone from the front end of your site!

You just have to delete the added code to undo this.

How to Hide WordPress Admin Bar for Specific User roles?

Now, you do not actually want to delete everybody’s admin bar. You may choose to mask the WordPress Admin for unique user positions in order to preserve anonymity.

Were you aware? : Generally, for all users except Admins, the WordPress Admin Bar is covered.

Let’s see how this can be achieved.

Using a plugin

  • Do you remember the Better Admin Bar I alluded to earlier? Go to it’s Settings and click on “Hide the Admin Bar for all users except Admin”.

Better-Admin-Bar-Enable

  • Scroll to the bottom and click the ‘Save’ button. It’s that. For all apps, except for Administrators, the Admin Bar is now secret.

2. By Modifying the Code:

  • Go via the Theme Editor to the functions.php section.
  • Add the code as follows:

if ( ! current_user_can( ‘manage_options’ ) ) {
add_filter(‘show_admin_bar’, ‘__return_false’);
}

Click on “Update File”. The Admin Bar is now hidden for all users except admins.

Next What?

The space for versatility is one of the great aspects about WordPress being open source. No wonder there are so many places for a common toolbar to be concealed!

We hope our article has helped you identify the best way to hide your Admin Bar and execute it. Just retrace and undo your steps in case you ever want to use the Admin Bar.

Check out the rest of our blog if you enjoyed this post and deal with WordPress regularly.

Our goal is to make your company run with WordPress. That’s why on all things WordPress, we create killer content. We are also making a killer tool for WordPress management called WPRemote.