How to Disable WordPress Admin Bar for All Users Except Administrators
Do you want to disable the WordPress admin bar for any or specific users on your site? WordPress has a method for manually disabling the admin bar per user but that is not feasible if you have a lot of registered users on your site. In this article, we’ll show you how to disable the WordPress admin bar for all users except administrators.
This video brought to you by SeedProd, the best WordPress landing and page builder plugin available, take a look at their site here:
For our discount use the code: WPBVIP
There are a few different methods to do this and for the first option, we would recommend going under Users, All Users and click on edit beneath the user you want to hide the admin bar from. You should scroll down and in the options, there will be the Toolbar option to show the toolbar when viewing the site and uncheck it.
To limit the admin bar based on user role, you would want to install and activate the Hide Admin Bar Based on User Roles plugin. Under Settings, Hide Admin Bar Settings you can check the box next to the role where you would like to hide the admin bar. The plugin download link can be found below.
For our other methods, we have the code written in our article where you can copy it from and the link to that article is below.
For the added code, you would need to go under Appearance, Theme Editor, and find the functions.php file also titled theme functions. Scroll to the bottom and add the code from the article. The first code will disable the code for all users except the admin while the second code will disable it for everyone.
If you liked this video, then please Like and consider subscribing to our channel here for more WordPress videos.
Feel free to take a look at the written version of this tutorial here:
Join our group on Facebook
Follow us on Twitter
Tweets by wpbeginner
Check out our website for more WordPress Tutorials
#WordPress #WordPressTutorial #WPBeginner
Leave a Comment
You must be logged in to post a comment.