The WordPress admin bar is the gray bar located at the top of your WordPress website. The WordPress admin bar includes various options and quick access to your WordPress dashboard or webpage.

Some WordPress users may want to disable or hide the WordPress admin bar so we have compiled a list of six different ways to do so. The options include CSS and PHP snippets, as well as using a WordPress plugin or the built in feature to disable the admin bar for specific users.

1. The first option includes copying and pasting the css snippet below and inserting it into your custom.css file or your primary css style sheet.

Enter this code into your current theme’s custom.css or style.css file to disable the admin bar:

#wpadminbar { display:none !important;}

2. The second option includes copying and pasting the php snippet below and inserting it into your functions.php file.

Enter this code into your current theme’s functions.php file to disable the admin bar:

function hide_admin_bar(){ return false; }
add_filter( 'show_admin_bar', 'hide_admin_bar' );

3. The third option includes copying and pasting the php snippet below and inserting it into your functions.php file.

Enter this code into your current theme’s functions.php file to disable the admin bar:

add_filter( 'show_admin_bar', '__return_false' );

4. The fourth option makes the WordPress admin bar only visible to your Admin accounts.

Enter this code into your current theme’s functions.php file:

if (!current_user_can('manage_options')) {
add_filter('show_admin_bar', '__return_false');
}

5. The fifth option includes installing the free “disable admin bar” WordPress plugin.

Follow the link below for the WordPress plugin directory page:

6. The sixth option is standard in WordPress and will hide the toolbar when viewing your website.

Access a WordPress user profile you would like to disable the admin bar for and un-check Show Toolbar when viewing site.

WordPress Show toolbar option

Reader Interactions

Comments

  1. thank you for that. I was finding it really irritating to see the tool bar and your option 1 worked perfectly. Cheers

Leave a Reply to twitter_DavidEnglewood Cancel reply

Your email address will not be published.