Hide or Remove Word Press admin bar

WordPress 3.1+ introduced a new feature : the Admin Bar. It is quiet cool and helpful feature. But while developing www.yogeshbabar.com I required to remove it when subscriber is logged in, so that they will not get access to dashboard. Also I have discussed this topic on wordpress.

Remove Word Press admin bar: For my developer friends below I’m going describe many short and simple techniques to hide or to remove WordPress admin bar.

1. Very simple one technique to hide to wordpress admin bar is..

add show_admin_bar(false); i hidden admin menu bar from my web site on front end… using

Below code only shows admin bar on front end for administrator user..
if other than admin user logs to web site then admin bar will not be displayed…

i added below code to my themes header yogeshbabar420.com..


<!--?php <br ?--> global $user_ID;
if( $user_ID ) :
if( current_user_can('level_10') ) :
show_admin_bar(true);
else : { show_admin_bar(false);
echo '</pre>
<style type="text/css"><!--
html{margin:0 !important;}
#wpadminbar{display:none; visibility: hidden;}
--></style>
<pre>
'; }
endif;
endif; ?>

user check …. hide for all
hide for perticular user

For my non-developer friends below only one short and simple technique to hide or to remove WordPress admin bar.

Simply use a plug-in named as Global Hide/Remove Toolbar Plugin and bye-bye to Word press admin bar. This plugin let you easily add a global option to hide/remove the front end Toolbar for logged in users for WP 3.1+ .

Download Global Hide/Remove Toolbar Plugin

1 thought on “Hide or Remove Word Press admin bar”

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top