Hide Admin Bar

If you’re one of those that don’t love the admin bar, here’s how to disable it, as well as the option to show/hide it.

add_filter('show_admin_bar', '__return_false');
add_action( 'admin_print_scripts-profile.php', 'hide_admin_bar_prefs' );
function hide_admin_bar_prefs() {
    ?><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 *

%d bloggers like this: