WordPress admin bar is very useful for most people, they can access some of the important menu easily from any page. But sometimes in certain cases you might want to hide the admin bar from your users.

So, here’s a way to hide admin bar in WordPress. Just put this code anywhere in your functions.php file.

show_admin_bar(false);

If you only want to show admin bar to users who have administrative privileges you can use this code:

if ( ! current_user_can( 'manage_options' ) ) {
    show_admin_bar( false );
}

If you want to hide the admin bar only in the frontend and keep it displaying in WordPress Dashboard you can use this code:

add_filter('show_admin_bar', '__return_false');

Editorial Staff

aThemeArt Editorial Staff prepares and cooks all the content that are published on athemeart.com. They are responsible for all type of web content including blog, social posts, videos, documentation etc.

Leave a Reply

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

fourteen + 20 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.

NEW FREE THEME! BCF IS HERE GET FREE THEME