Hide WordPress Admin Bar

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.


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');

Inspire us with your love!

Facebook Twitter Pinterest Reddit

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.

You can check also

Leave a Reply

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