
WordPress 3.1 introduced a new feature: the admin bar. It is quite cool, but I’ve heard from many people who’d like to remove it. Here is a little recipe about how you can remove it.

WordPress 3.1 introduced a new feature: the admin bar. It is quite cool, but I’ve heard from many people who’d like to remove it. Here is a little recipe about how you can remove it.
Paste the following piece of code into your functions.php file, save it and goodbye admin bar.
wp_deregister_script('admin-bar');
wp_deregister_style('admin-bar');
remove_action('wp_footer','wp_admin_bar_render',1000);
Thanks to Specky Boy for the tip!
9 Responses
Your solution leaves me with html margin top: 28px.
I think a better way to disable it would be:
function my_function_admin_bar(){
return false;
}
add_filter( ‘show_admin_bar’ , ‘my_function_admin_bar’);
Yep, Ciprian’s solution works fine. I prefer it to the one you talk about.
Or even more simple, just add to your function.php file:
add_filter(‘show_admin_bar’, ‘__return_false’);
show_admin_bar( false ); in functions.php works fine.
http://codex.wordpress.org/Function_Reference/show_admin_bar
Steven Gliebe Solution worked best
Thnak’s Steven
The main problem (for me) with Jean-Baptiste code is that it disables Admin Bar into the backoffice too =( (I have no 20px margin)
Insert show_admin_bar( false ); to functions.php is another way.
show_admin_bar( false );is the best way as shown in the codex pageTrackbacks: