how to remove wordpress admin bar

4 Best Ways to Disable WordPress Admin Bar Users

In this article, I will teach you.4 Ways to Disable WordPress Admin Bar for all users. By default, WordPress shows an admin bar on the top for all logged-in users. This toolbar is seen in the WordPress admin area in addition to all other pages when you’re logged in.

What’s WordPress Admin Bar?

The WordPress admin toolbar contains helpful shortcuts to different WordPress sections. The shortcuts available in the admin bar change based mostly on a users’ role and permissions in WordPress.

how to disable wordpress admin bar

Furthermore, when viewing the public pages on the front-end of your website, the admin bar generally is a bit distracting. It might also have an effect on your website’s design and user experience.

Luckily, there are a number of ways to simply disable the WordPress admin bar for all users except administrators.

Here are 4 methods to disable the admin bar in WordPress:

Method 1. Disable WordPress Admin Bar for Any Users

WordPress allows each user to disable the admin bar by simply modifying their user profile. As a website owner, you may also edit different user’s profiles and disable the admin bar for them.

If you wish to disable the admin bar for any specific user in WordPress, you’ll edit their user profile.

Simply go to the Users » All Users web page and then click on the ‘edit’ hyperlink for any user you want to disable the admin bar for.

disable wordpress admin bar

It will bring you to the user profile editor webpage. From here, uncheck the box next to the ‘Show toolbar when viewing the website’ option.

wordpress remove admin bar

Scroll down and click the ‘Update User’ button to save lots of your changes.

It will disable the admin bar for that particular user once they go to the website.

admin bar disable wordpress

When you’ve got a handful of users, then you’ll be able to go ahead and manually disable the admin bar for all of them. However, if you run a membership website with a lot of users, then this method wouldn’t work.

Fortunately, there are other ways to rapidly disable the admin bar for all users except administrators.

Method 2. Disable Admin Bar for All Users Except Admins with a Plugin

This method allows you to shortly disable the WordPress admin for all users.

First, you’ll want to set up and activate the Hide Admin Bar Based on the User Roles plugin. For more details, see our step by step information on how to install a WordPress plugin.

Upon activation, go to the Settings » Hide Admin Bar Settings web page. From here, verify the boxes next to the user roles where you want to disable the admin bar.

4 ways to disable wordpress admin bar

Don’t forget to click on the ‘Save Changes’ button to retail your settings.

Method 3. Disable Admin Bar for All Users Except Administrators Using Code

This method requires you to add code to your WordPress theme files. When you have not done this before, then check out our information on how to copy and paste code snippets in WordPress.

add_action('after_setup_theme','remove_admin_bar');
functionremove_admin_bar() {
if(!current_user_can('administrator') && !is_admin(){
show_admin_bar(false);
}
}

Easily add the following code to your theme’s functions.php file or a site-specific plugin.

This code checks if the current user isn’t an administrator, and they aren’t viewing the admin dashboard. If both conditions match, then it’ll disable the WordPress admin bar.

Don’t forget to save lots of your changes and check your website to make sure everything is working fantastic.

Method 4. Disable Admin Bar for All Users Including Admins

What if you happen to needed to disable the admin bar for all users including yourself and any other administrator on your website?

You are able to do this by modifying the code we showed earlier.

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

Simply add the following code to your theme’s functions.php file or a site-specific plugin.

This code will disable the admin bar for all users when viewing the public pages of your website. All users will nonetheless be capable of seeing the toolbar inside the WordPress admin dashboard.

I hope you learn this article. How to disable the WordPress admin bar for all users except administrators. If you like this article, then subscribe to our website.

THANK YOU SO MUCH FOR READING THIS ARTICLE

Check more daily updates to get subscribe to our website and also you can get informational articles and much more etc.

About webs360

Webs360 is to provide the best content to our readers by covering useful Guides and informative topics on Tech, Blogging, Android, Games, WordPress, Mobile, Soft360, Learning Point...

Check Also

snapchat filters not working

7 Ways to Fix Snapchat Filters Not Working Issue

In this article, I will teach you. 7 best ways to fix Snapchat filters not …

Leave a Reply

Your email address will not be published. Required fields are marked *

0 Shares
Share via
Copy link
Powered by Social Snap