Hide the Admin Bar in WordPress

As you know whenever an user login to WordPress system, who-ever it may be admin or just a subscriber, WordPress automatically shows an admin bar at top of the screen. If the user is administrator then this admin bar provides some useful functionality such as links to navigate to various admin panels of websites, moderating comments, shows available updates etc. The options may be vary depending upon the plugins you have installed.

You might know that this admin bar can be hidden form Profile > Toolbar > Uncheck “Show Toolbar when viewing site”. This is something depends on user’s will. If they like that admin bar they will not hide it.

But it may happen that, you want to hide admin bar for all users maybe due to it interferes with your design. Then you can achieve this using simple WordPress hook:

add_filter('show_admin_bar', '__return_false');

Now the admin bar will be hidden from all user. That’s all. Thank you WordPress hooks!

Leave a Reply

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