DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

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.


Thanks to Specky Boy for the tip!



  1. 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’);

  2. Yep, Ciprian’s solution works fine. I prefer it to the one you talk about.

  3. Or even more simple, just add to your function.php file:

    add_filter(‘show_admin_bar’, ‘__return_false’);

  4. Steven Gliebe Solution worked best 🙂

  5. Thnak’s Steven

  6. The main problem (for me) with Jean-Baptiste code is that it disables Admin Bar into the backoffice too =( (I have no 20px margin)

  7. Insert show_admin_bar( false ); to functions.php is another way.

  8. show_admin_bar( false ); is the best way as shown in the codex page

Leave a Comment

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