Menu
Disclosure: ULTIDA's content is free & reader-supported. We may earn a commission if you click & buy through our links. Your support helps us create the best content & make a difference.
Tutorials

How to Hide WordPress Admin Bar (Easy Guide)

how to hide wordpress admin bar

If you want to know how to hide WordPress admin bar, this guide is for you!

Even though the admin bar is very useful for you as an administrator, you may need to hide it for the rest of your team members or subscribers.

Or even for yourself if you DO NOT find it that handy!

Fortunately, there are three ways to do it.

You can use the dashboard, use a plugin, or insert some code.

This post covers:

All three solutions can be tricky and COULD hurt your WordPress site’s backend if not done properly.

But that’s what we are here for.

Let’s find out how to hide your WordPress admin bar quickly and safely.

How To Hide WordPress Admin Bar Via The Dashboard

Starting with some basics: Many beginners confuse the WordPress admin bar with the admin menu.

Just to clarify: The WordPress admin bar is a completely different function.

To take a look at your site’s admin bar, simply go to any page on your site (NOT from the backend).

If you are already logged in from the backend, you will see a small menu at the top of your screen.

This is the WordPress admin bar.

Now how do you HIDE it for specific users?

For example, you might have multiple authors who do not need to have access to this bar when accessing your site.

The easiest way to do this is through the WordPress dashboard.

Just go to the Users menu in your admin, select the users you do not want to have access to your admin bar, and click Edit.

hide wodpress admin bar via dashboard

Look for the Toolbar section from the user menu and click on the “Show Toolbar when viewing site” option.

how to hide wodpress admin bar in dashboard

Even though this is a very simple way to hide the admin bar for certain users, it has some flaws.

For example, you have to repeat the process for each user.

If you have a website with many subscribers, this could take DAYS! (I don’t have time for this.)

For this reason, we have found other alternatives.

The two best friends of a WordPress administrator: plugins and codes!

How To Hide WordPress Admin Bar Via A Plugin

If you read our blog regularly, you already know that there is more than one plugin for just about every task in WordPress.

And hiding the WordPress admin bar is NO exception.

Our testing found that the best free plugin for this task is the Hide Admin Bar Based on User Roles.

To download the plugin, go to Plugins > Add New and enter the plugin’s name.

Click Install and you are ready to go.

how to hide wordpress admin bar via a plugin

Note: You can also check our easy and quick guide on how to install a WordPress plugin properly.

The plugin is easy-to-learn and the process WON’T take more than a few clicks.

These are the two things you can do with this plugin.

1. Hiding WordPress Admin Bar for All Users Except Administrators

The admin bar is quite useful for most WordPress blog/site owners.

So if you need to hide the WP admin bar for everyone but your administrators, do not worry!

After you install the plugin, you can find it in the dashboard under Settings > Hide Admin Bar Settings.

Once you access the menu, you must click “Hide admin bar for selected user roles” and select all roles except administrators.

hiding wordpress admin bar for all users except administrators

Click “Save Changes” and you are all set.

2. Disabling WordPress Admin Bar for All Users

Sometimes, you might need to hide the WordPress admin bar for all users.

If that’s the case, go to Settings > Hide Admin Bar Settings and click on Hide Admin Bar for All Users.

disabling wordpress admin bar for all users

After you do so, save your changes and the admin bar will be automatically removed for all users.

How SIMPLE was that?

How To Hide WordPress Admin Bar With Code

If you are not a fan of plugins, there is another way to get rid of the WordPress admin bar: via a code.

We know that adding a code sounds A BIT complicated, but you do not have to worry.

This doesn’t mean there’s no risk included.

This is why you should always backup your website before applying new code.

There are two different ways to hide your WordPress admin bar with code:

Using Code to Hide WordPress Admin Bar – Functions.php

You can turn off the WordPress admin bar for all users using the function.php file.

Attention: Be careful what you’re doing!

To access this coding page, you need to open your backend dashboard and go to Appearance > Theme File Editor > Functions.php.

how to hide wordpress admin bar with code

At the bottom of that page, you can add the following code:

/* Disable WordPress Admin Bar for all users */
add_filter( ‘show_admin_bar’, ‘__return_false’ );

This code will automatically disable the WordPress admin bar for all users.

If you want your administrators to be able to access the admin bar, use this code instead:

add_action(‘after_setup_theme’, ‘remove_admin_bar’);
function remove_admin_bar() {
if (!current_user_can(‘administrator’) && !is_admin()) {
show_admin_bar(false);

Using Code to Remove WordPress Admin Bar – CSS

If you prefer coding via CSS, this last solution is the one for you.

To add a new CSS code go to Appearance > Additional CSS. This will redirect you to the customizer of your website where you can add your own CSS code.

To remove the admin bar for all users input the following code:

#wpadminbar { display:none !important;}

And that’s pretty much it.

You now have all the tools you need to hide the WordPress admin bar for all or some of your users in a snap.

Conclusion On How To Hide WordPress Admin Bar

I shared with you the three ways our team uses to hide the WordPress admin bar.

The WP toolbar isn’t something you always need (although it’s beneficial for the admin); thus, removing it comes in handy.

Remember, you can always bring it back, REGARDLESS of how you remove the admin bar.

But do a backup of your website for any website modification you do, especially when choosing to “mess” with the code.

No Comments

    Leave a Reply