hide WordPress 3.1 admin menu

I just updated one of my blogs to the new wordpress 3.1 and i need to hide the admin menu that shows up on top of the pages. How do i disable it ?

thanks

Related posts

Leave a Reply

4 comments

  1. This would hide the Admin Bar for all users except Administrators. Add at end of functions.php:

    function my_function_admin_bar($content) {
        return ( current_user_can("administrator") ) ? $content : false;
    }
    add_filter( 'show_admin_bar' , 'my_function_admin_bar');
    
  2. Add the following to your theme’s functions.php file:

    // Disable Admin Bar for all users
    add_filter('show_admin_bar', '__return_false');
    
    // Remove Admin Bar Options from all users' Profile page
    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
    
    }