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.
Subscribe in a Reader
Subscribe by Email
Like Us on Facebook
Follow on Twitter
Find Me On LinkedIn





February 23rd, 2011 at 1:46 pm
Great post, Scott. Very timely as I will be updating shortly. Thanks again!
February 23rd, 2011 at 3:45 pm
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
February 23rd, 2011 at 7:12 pm
Great post … Not more than a few minutes after I tweeted about the awesomeness of it, somebody wrote to ask how to remove the admin toolbar…
February 23rd, 2011 at 7:51 pm
[...] This post was mentioned on Twitter by Paul Holmes, Scott Bothel. Scott Bothel said: New Blog Post: Welcome WordPress 3.1, now turn off the admin bar! http://bit.ly/gGh9Iv [...]
February 24th, 2011 at 7:31 am
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!
March 10th, 2011 at 10:56 am
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!
May 4th, 2011 at 3:43 pm
This is a really great share. I really appreciate this little wordpress tidbit as it was becoming frustrating while testing and developing templates.
July 3rd, 2011 at 12:44 pm
This is the first thing I’m adding to ever new theme!