Removing The WordPress Toolbar

One thing that has caused me some grief since the release of WordPress 3.1 is the admin bar that appears up the top of the blog when you are logged in.

Call me a stick in the mud but I have never really used it since its introduction and on a few sites it has even gone as far as breaking the appearance of the template.

Luckily with a bit of research I found its not that hard to remove the admin bar completely, simply add the code below to the functions.php file of your theme and the admin bar should disapear forever.

add_filter ( 'show_admin_bar' , '__return_false' );
add_action ( 'admin_print_scripts-profile.php' , 'hide_tool_bar');

function hide_tool_bar () { ?>
        <Style type = "text / css" >
                show-admin-bar {display: none;}
        </ Style>
<?php }

Leave a Reply

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