Welcome WordPress 3.1, now turn off the admin bar!

WordPress upgrades are always welcome and bring with them more and more options for extended functionality and ease of use. And WordPress 3.1 is no exception. You can read about the new features here, but I am just going to throw out the burning question for many theme developers – how to get rid of that admin bar.

In my case, I developed a custom admin bar for my templates which is overlaid by the new WordPress admin bar. To disable the admin bar, simply visit your user profile in the WordPress admin area under Users/My Profile. Uncheck the boxes next to Show Admin Bar.

For theme developers, you can also disable the admin bar in the functions.php file by adding the following:

/* Disable the Admin Bar By Default */

add_filter( 'show_admin_bar', '__return_false' );

/* Remove the Admin Bar preference in user profile to remove temptation... */
remove_action( 'personal_options', '_admin_bar_preferences' );

And of course, there is always a plugin out there ready to do the work for you with the Disable Admin Bar plugin.

Happy upgrading!

Thanks to summerchilde in the support forum for a better code snippet.

8 thoughts on “Welcome WordPress 3.1, now turn off the admin bar!

  1. Thank you for this little post. I upgraded and have a mulit-user install and this little snippet of code did a great job at globally removing the admin bar.

    Thanks :)

  2. Pingback: Tweets that mention Welcome Wordpress 3.1, now turn off the admin bar! | FourTen Creative -- Topsy.com

  3. This is a really great feature, but at least provide a global “on/off” switch! (or a “roll-back-to-previous-version-until-I-have-figured-out-how-to-fix-the-mess-you-made” button). However, WordPress still rocks my world and takes care of all the development I am too lazy to do myself :) Good work, guys!

  4. thanks I was really stuck trying to get rid of that thing. It was causing havoc as I kept having to log out of wordpress but am working on several different WP sites, and autofill couldn’t manage to show the right login details for each one!!!! aaaargh!

    Now at least I only have to log out when I finish a session!

  5. This is a really great share. I really appreciate this little wordpress tidbit as it was becoming frustrating while testing and developing templates.

Leave a Reply