How to Disable WordPress Admin Bar for All Users Except Administrators

Some sites want to hide the ability for logged in users to see the admin bar. This is to hide it from users who will not be using the bar. In this video, we will show you how to disable the WordPress admin bar for all users except administrators.

If you liked this video, then please Like and consider subscribing to our channel for more WordPress videos.

Text version of this tutorial:
http://www.wpbeginner.com/wp-tutorials/how-to-disable-wordpress-admin-bar-for-all-users-except-administrators/

Follow us on Twitter:

Checkout our website for more WordPress Tutorials
http://www.wpbeginner.com/

Summary of this Tutorial:

Start by going to your theme area in administrator

Click Editor and find your functions.php and paste the code in

add_action('after_setup_theme', 'remove_admin_bar');

function remove_admin_bar() {
if (!current_user_can('administrator') && !is_admin()) {
show_admin_bar(false);
}
}

Shares
|ShareTweet

Leave a Reply

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


*