How to Disable/Remove WordPress 3.1 Admin Bar
Recently, WordPress released its 3.1 version which brings a number of new features to our favorite blogging platform WordPress, the main feature that was added being the WordPress admin Bar which is displayed on top of your WordPress blog when you are logged in.
The new WordPress 3.1 Admin Bar makes it easy for the registered users to access their Dashboard, Profile and other common blogging options through a drop down menu.
Different Ways The Admin Bar Appears
What I have come to know from Famousblogger Hesham’s post about WordPress 3.1 update is that a different type of admin bar appears for different user roles who are logged in to our blog.
Lets check each of them:
Admin
Contributor
Subscriber
How to Disable WordPress Admin Bar?
I know many of you do not like that admin bar hanging around there and you may want to disable it so how exactly will we do it.
Simple Disable:
Well this method disables the admin bar per user basis. For example, if you want to disable the admin bar for your account just go to your profile and disable it.
Here is how:
Go to Users > Your Profile > Show Admin Bar
and uncheck on “when viewing site”
Easy as that. But this method disables the admin bar only for that particular user.
How to Disable/Remove Admin Bar Using Plugins?
Just after the release of WordPress 3.1, a number of plugins have come up to delete/disable/hide the WordPress admin bar as well as to modify and relocate it. You can use any the following WordPress plugin to disable/remove your admin bar.
Global Hide/Remove Admin Bar Plugin – Easily add a global option to hide/remove the new Admin bar in WP 3.1+. Adds an option to the Settings Menu to globally turn off the Admin Bar and/or turn off the user option in the profile to show admin bar.
Admin Bar Removal (completely disable) 3.1 only – Completely disables Frontend and Backend Menu that now appears on the WordPress 3.1 based blogs, plus helps to remove code and get more free memory.
Admin Bar Disabler – Disable the WP Admin Bar in 3.1+ entirely, or only for roles and capabilities which aren’t in the ‘whitelist’ or ‘blacklist’.
WP Custom Admin Bar – A really simple and easy to use plugin to help gain control of the new Admin Bar. This gives you options to change who sees the Admin Bar based on their user role, change or override the default styling and remove the Admin Bar altogether.
Admin Bar Minimiser –The Admin Bar Minimiser Plugin was written to help users keep the admin bar active but be able to minimise it at any time to make it less obtrusive.
Stick Admin Bar To Bottom – Annoyed by the new Admin Bar that is covering the top 28 pixels of your website, but you don’t want it completely gone? This plugin sticks the Admin Bar to the bottom of your screen!
Hide Admin Bar Search – Small plugin to hide the search box in the admin bar in both dashboard and site views.
Logged Out Admin Bar -Makes that admin bar always visible even for logged out users. Adds a login button when logged out, the shortlink also displays when available
Always Show Admin Bar – Always shows the admin bar if the user has previously logged in to the site. Non logged in users will see the bar in the normal place, complete with a login link.
How to Disable/Remove Admin Bar Through Code?
Disable Admin Bar Completely for Everyone
If you want to disable admin bar completely for everyone. You can add EITHER of the following codes into the functions.php of your current theme:
[php]remove_action(‘init’, ‘wp_admin_bar_init’);
[/php]
OR
[php]add_filter( ‘show_admin_bar’, ‘__return_false’ );
[/php]
Disable Admin Bar Preference In User Profile
If you want to remove the Admin Bar preference in user profiles add this to the functions.php of your current theme:
<?php function hide_admin_bar_settings() {
?>
<style type="text/css">
.show-admin-bar {
display: none;
}
</style>
<?php
}
function disable_admin_bar() {
add_filter( 'show_admin_bar', '__return_false' );
add_action( 'admin_print_scripts-profile.php',
'hide_admin_bar_settings' );
}
add_action( 'init', 'disable_admin_bar' , 9 );
?>
Disable WP Admin Bar for specific users
To disable the WP Admin Bar, and the Admin Bar preference on his/her profile page for a specific user, add the following to your theme’s functions.php file:
<?php function hide_admin_bar_settings() {
?>
<style type="text/css">
.show-admin-bar {
display: none;
}
</style>
<?php
}
function disable_admin_bar() {
if ( 2 == get_current_user_id() ) {
add_filter( 'show_admin_bar', '__return_false' );
add_action( 'admin_print_scripts-profile.php', 'hide_admin_bar_settings' );
}
}
add_action( 'init', 'disable_admin_bar' , 9 );
?>
Or you could do the reverse, and enable the WordPress Admin Bar just for one user, by disabling it for everyone else:
<?php function hide_admin_bar_settings() {
?>
<style type="text/css">
.show-admin-bar {
display: none;
}
</style>
<?php
}
function disable_admin_bar() {
if ( 2 != get_current_user_id() ) {
add_filter( 'show_admin_bar', '__return_false' );
add_action( 'admin_print_scripts-profile.php',
'hide_admin_bar_settings' );
}
}
add_action( 'init', 'disable_admin_bar' , 9 );
?>
Disable Admin Bar According to User Roles
Sometimes you may want to enable/show the admin bar for only a few user levels (Example: who have the rights manage_options). Use the following code:
function fb_show_admin_bar() {
if ( current_user_can( 'manage_options' ) )
return TRUE;
else
return FALSE;
}
add_filter( 'show_admin_bar', 'fb_show_admin_bar' );
Remove or Add an Admin Bar Menu Item
You may also want to add or remove new menu items in theadmin bar for example lets says, you want to Remove the “Comments” link from the WP Admin Bar, or Add a new link to Add New Media under the “Add New” section, we can do something like the following :
function nlk_admin_bar_render() {
global $wp_admin_bar;
// we can remove a menu item, like the COMMENTS link, just by knowing the right $id
$wp_admin_bar->remove_menu('comments');
// we can add a submenu item too
$wp_admin_bar->add_menu( array(
'parent' => 'new-content',
'id' => 'new_media',
'title' => __('Media'),
'href' => admin_url( 'media-new.php')
) );
}
// and we hook our function via
add_action( 'wp_before_admin_bar_render', 'nlk_admin_bar_render' );
Credits to the following websites for the codes:
- Control when to display WordPress admin bar
- How to disable the WordPress Admin Bar
- Disable/enable the Admin Bar for specific users
- REmove comments link from WordPress admin bar
- Upgrading Thesis Theme Blog To WordPress 3.1
Share this article
Category: Wordpress
About the Author (Author Profile)
Kori is the editor and owner of Netchunks, a premier blog about Webmaster and Blogging Tips. She intends to make the web a friendlier place by sharing info and articles which will help other webmasters and bloggers to become successful online.Comments (63)
Trackback URL | Comments RSS Feed
Sites That Link to this Post
- הסרת סרגל ניהול ב WordPress 3.1 | אלכסנדר יודייב | March 10, 2011
- patrickstummer » Admin Bars | April 6, 2011
- Publikační systémy – WordPress 3.1 | Phire Base - Graphic, Webdesign, Inspiration. Adobe & WP | May 30, 2011
- Admin Bar Removal completely disable | Best Plugins - wordpress – widgets – plugin | April 9, 2012












Twitter: vanmarciano
says:
Top tip Shiva, it was starting to get annoying each time I previewed my blog through admin, so thanks.
Fabrizio recently posted..23 Ways to Make Money Online Without Spending a Penny!
Very detailed and useful tips. However, I do not see any reason why you remove the admin bar. It really has many handy functions that allow you to save time during managing blog.
Vuong recently posted..Creat Favicon With HTML-KIT
I totally agree with Vuong. The admin bar is one of the most notable feature in the WordPress 3.1 and saves a lot of time for us. I don’t get the idea of removing it.
Tuan recently posted..How to Set Up Microsoft Outlook for Google Apps Mail
Twitter: netchunks
says:
Well, actually many people I have seen do not like the Admin bar and many do like the admin bar, depends on people’s point of view so for them this tutorial is certainly going to come handy I think.
Shiva Chettri recently posted..How To Increase Affiliate Sales
Nice article, you tutorials very detail but I love WP 3.1 admin bar, it is convenient when switching between blog and admin cpanel. I will not remove it. Thanks for sharing this.
Twitter: netchunks
says:
Glad you liked the article Trung, Ya I too like the admin bar but there are many who don’t so this one is for them
I see the admin bar as pointless. I usually have two tabs open, one for admin, one for the site. I’d rather not cause a postback just to get from admin to the site…I see it as a time waster.
Wayne recently posted..Blogger is getting a well deserved facelift and new functionality in 2011
Twitter: mani0993
says:
WordPress should have kept the Admin Bar options as Global Settings rather than Individual settings.
Mani Viswanathan recently posted..3 Effective Ways to Promote your Posts
Twitter: netchunks
says:
Well Mani, I think the individual setting is better, since some may like the admin bar and some may not…depends upon the user preference
Shiva Chettri recently posted..How To Increase Affiliate Sales
I really had a great problem with it! Easily disabled it from my profile!
Ayush Chand recently posted..Change Display Name in Gtalk and Gmail
Twitter: netchunks
says:
That is great, but I really like the toolbar makes many things easier
Shiva Chettri recently posted..How To Increase Affiliate Sales
Twitter: technostarry
says:
Thats really a great list of plugins. But I would prefer to disable it by editing functions.php. Why use plugin, when you can do it with a simple code.
Saqib recently posted..What is HDFC Netsafe Virtual Credit Card and How it Works
Twitter: netchunks
says:
You are right Saqib, it is better to do it with code than to use Plugin. Thanks for the comment
Shiva Chettri recently posted..5 Reasons People Backup in the Clouds
Right now, I have the Toolbar disabled.
I’m the type of persons that takes a while to get used to new things, and so far I don’t see how it will help me to be more productive.
Gustavo recently posted..Recuva- Recover Deleted Files
Twitter: netchunks
says:
It depends on people’s preference. I find it useful since I can easily switch between my dashboard and blog. (I am quite lazy and this update has made me even lazier, saves me from typing /wp-admin again and again…lol
Nice stuff. That toolbar is a bit annoying to me
Mark recently posted..iGUGU InterneTV is now available
Twitter: netchunks
says:
Some find it useful, some annoying. I am glad you found the article useful. Thanks for the comment
For me, admin bar is quite good so will not remove it. However, there are some people may be not like it so this article will be a big help for them.
Dana recently posted..Motorola XOOM Debut on Verizon Wireless
Twitter: netchunks
says:
Ya Dana, i too like the admin bar…find it very useful. Thanks for the comment
Shiva Chettri recently posted..Top 5 Blogging Tips For the Beginners
Twitter: mohdaatif90
says:
When i upgraded my WP i was amazed why i there is a bar on top !! after searching i got to know it is new feature . thanks for the article i would like to disable it .
aatif recently posted..Top Commentators Award For February 2011
Twitter: netchunks
says:
Ya Aatif, I too was shocked to see the admin bar when I updated but now I have got the hang of it

Shiva Chettri recently posted..How To Improve Alexa Ranking
Twitter: Jajodia_Saket
says:
Soo many plugins came to remove admin bar..

Don’t know why ppl want to remove it but I found it very user stuff..
Saket Jajodia recently posted..Download YouTube Videos In Very Easy And Simple Way
Actually there is a plugin that removes the admin bar, google for ” disable admin bar plugin” for WordPress and you will find it!
Hesham recently posted..Blog Post Promotion Strategies and Traffic Generation Tips
Twitter: Jajodia_Saket
says:
Shiva himself have given 9 Plugins name to do so.. And I don’t want to remove admin bar (As I told in my above comment)..
Saket Jajodia recently posted..Hide Gridlines In Google Docs Spreadsheets
Twitter: netchunks
says:
Hi Hesham,

I have already mentioned the list of plugins, I also mentioned the code since many people would not want to install plugins. Thanks for the comment
Shiva Chettri recently posted..How To Increase Affiliate Sales
I quite like the latest features, actually I met some serious problems in the first 2 days before the other plug ins updates. Thanks for this excellent guide. I really like the admin bar options.
Hey thanks for the tip Shiva!
The bar was really annoying for me.. 

Saksham recently posted..Blog Fast
I see this bar, and see much like bloggers bar. Though I thought this bar is there till I am logged in. Anyways now harm in removing it. Great tips.
shah recently posted..Skype Voip Calls On HDTV Thanks To Panasonic
I am also making a post on admin bar. I think u got the code from yoast.com. there is a mistake in the code.if u paste as it is it wont work. “?>” has to be added at the end of “disable admin bar” function. check it u will understand.
Mukundan Srinivasan recently posted..Automatically Alert Your Users about New Blog Posts
Twitter: netchunks
says:
Thanks dude, Silly me, I forgot to notice that.
I don’t like the admin bar too… gonna hide/remove it.

Jasmine recently posted..KnownHost Managed VPS Hosting
I like this new feature and I think it is not a good idea to remove it, it can save a lot of time. Everything is on your fingertips.
James recently posted..How to Earn Revenue From a SEO Reseller Program
Twitter: netchunks
says:
Personal preferences mate, Some people may want it to be there, Some don’t . Personally I like the admin bar

Shiva Chettri recently posted..How To Increase Affiliate Sales
I still haven’t decided whether I like this new feature yet. It has it’s good points and bad.
Wow, I didn’t think the admin bar would be met with different attitudes. I thought it was cool. But I can understand if some people get annoyed by it. We all have different preferences and it’s nice to know other people’s view especially if they are not the same as yours.
Anne Sales recently posted..Lufthansa voucher code
Twitter: rohitbatra14
says:
Nice Tutorial Shiva…thanks for sharing it i will try out when i want to get rid off that Admin Bar…
Rohit Batra recently posted..Twitterrific App for iPod Touch 4G
I’ve tried both of these codes:
[php]remove_action(‘init’, ‘wp_admin_bar_init’);
[/php]
OR
[php]add_filter( ‘show_admin_bar’, ‘__return_false’ );
[/php]
But this isn’t working. I tried adding it to my theme’s functions.php file but with no avail. Please help, where exactly I need to put this code in the functions file?
Jenny recently posted..How to recover Deleted Windows Files
Twitter: netchunks
says:
Hey Jenny you need to add it without the [php] and [\php] or you can just install any of the plugins given above
.show-admin-bar {
display: none;
}
This is something much needed for any wordpress noob who has just started for WP. Thanks for these tips. You have added so many options in the article. Great work.
Rajesh recently posted..How to bypass Sharecash surveys- Sharecash Downloader service
I have done it and it works for all the browsers, except Internet Explorer (I am testing on the version 9)
Have you got any idea about what to do?
Fabio Neves de Brito recently posted..What is Reinstatement fee (cause of chargeback by the customer)?
Thank you for helping me properly destroy that abomination. That damned admin-bar pissed me off enough to scream. I could scream just remembering it.
you have posted a very nice tutorial. i think every one need it. i also dont like admin bar. i dont know why they have add it.
Thanks Shiva…
That Admin bar sure was a pain. I would have thought that WP would have allowed the admin more flexibility by allowing for a global kill switch on the new bar of the admin didn’t like it. Oh well… so long as there are enterprising programmers out there, all these minor items can be handled pretty quickly.
Great post. I have recently finished a new online training course for the local marketing consultant. This course offers excellent training that teaches people how to become marketing consultants to their local businesses.
Visit the site at The Local Consultant
and watch a two minute video that explains The Four Pillars of Local Marketing.
Michael
Hi! The WP Admin bar might be a nice feature, but there’s no easy way to disable it, Thanks for explaining how to disable the WordPress admin bar to relax us in this regard.
Marmot recently posted..Spring Sleeping Bags
Sorry, you must have the wrong number top heavy models >:)) russian sex model
DD z-line model zln yqcqqv model a apprasial 38251 tits asian models 70411 underwear model bread >:-DDD model train picture ipnmpz hot fitness models qffszz teen modeling oregon 26438 child model galleris 2807 penthouse magazine models ufkbs model litlle teens 7671 bombay kid modeling
teen asain models ube child supermodel list amq model agency contract >:DDD sugar artmodeling com
teen model album 45650 gala model kid %-DD 13y model russian %-O
This is excellent, just what I was looking for. The code worked like a charm. Thanks so much!
same here it would really help me to remove that annoying wordpress bar in my website I have been looking for a way but no luck. But luckily found this guide.
What line of work are you in? jessica renee young 3167
Thank you for giving various options on disabling admin tool bar in WordPress. I would go for disabling it using plugins because programming is complicated for me.
Thanks,
Mac
Twitter: tenfastfeet
says:
Nice! I think I’ll use check out one of the plug-ins.
Hi,
please help i dont want to use plugin, thanks!
first of all, this hack is cool.
My website use Genesis framework. but none of your code working. i already placed them in the functions.php of the child theme and genesis. none works
Great, its work on my blog, but how to remove this line :
html { margin-top: 28px !important; }
* html body { margin-top: 28px !important; }
Thank you
Hi,
I have tried every method listed to remove admin bar from my installations (WP 3.2.1 BP 1.5.1 Twenty Eleven (modified) theme) with no success.
Is there something changed between WP 3.1 and 3.2.1?
Also having problems in 3.3 — uncheck show toolbar, dump cache, and it’s still there. And apparently your brilliant software thinks my comment is too short, and is suggesting rather cheekily that I “say something useful.”
Twitter: netchunks
says:
Hi Max,
Sorry for the rude behavior by my plugin, actually I installed it because people were leaving lot of spam “thank you” kind of 2-3 word comments, not meant for genuine comments. Anyways I think this fix will not work for the new 3.3 update since they have come up with a newer admin bar. Will be updating this post as soon as I find how to disable it.
Shiva Chettri recently posted..3 Ways to Promote Your Website Without Dropping a Dime
why would we remove this bar its very useful and it only appear to us not to our visitors
I found the compulsory Toolbar so disgusting that I shall not continue with WordPress; whilst you are to be praised for offering so many solutions, eventually with progressive updates they will stop working, and people will be forced to stare at these vile bars squatting on their blogs, simply because devs want to make everything exactly how they want things.
As an aside, most of these foul social networking diseases including Wibya, Twitter, slide-in bars, floating bars etc. can be blocked through one’s browser using AdBlockPlus, Ghostery, and Stylish, each with especial rules easily found on Google. Stylish even changed the black Google bar to white, making it less obstrusive.
Twitter: familybizguy
says:
Just wanted to say thanks for this post. I could tell it was only on a per use basis but wanted to be sure. Thanks for the plugin and code tips also!
PS: I LOVE using commentluv!
Joe Shaw recently posted..Want The Best WordPress Plugins for 2012?