Although WordPress admin bar is quite useful as it has quick links and shortcuts to WordPress backend but many bloggers find it annoying and want to hide or disable it altogether.

To make a website looks more professional, Website owners usually hide the admin toolbar for users by providing a front-end user management.

In case if you don’t know, the admin bar is a menu appears automatically at the top of your site front end for logged in users. Consider it a trimmed version of your WordPress dashboard.

wordpress admin bar

Turn off Admin bar from user profile

Admin bar settings are available in every user account which can be used to easily turn off admin bar from user profile settings.

  • From your WordPress dashboard, go to your profile and uncheck the option Show Toolbar when viewing site.

user profile admin bar

This option is enabled by default to show admin toolbar to all users. To override this setting, you can use any of the three methods below.

Hide admin bar for all users

To auto hide admin toolbar for your site all-together, add the following code to your theme’s functions.php file.

show_admin_bar(false);

Use CPanel or FTP to access your theme files. Mostly the path is public_html>wp-content>themes>your-theme-directory>functions.php

Woopoo's Tip

Show admin bar only to admins

The above code will hide admin bar globally for all user accounts in WordPress but what if you want to show it to admins only.

Add the following code in functions.php file to enable admin bar only for administrator accounts.

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

The code above will check if a user account is an administrator. If yes, it will show the admin bar otherwise remove it for all other users. You can use the same code to be based on other user roles.

Use a plugin to hide admin bar

If coding gives you nightmares then an easy way is to use a plugin for hiding admin toolbar. The plugin which works for us is Hide Admin Bar.

Install and activate Hide Admin Bar plugin. No settings required. See how to install a plugin in WordPress if you need help.

Additional Readings

We hope you found this article useful for not showing admin bar in your WordPress blog. If you still have any questions, do let us know using the comments section below and don’t forget to follow us on Twitter and Facebook

Gimme a Share pleeeaase!

Pin It on Pinterest

Share This