Support » Fixing WordPress » How to remove Admin/User Bar on WordPress 3.1?

  • ipunkbali

    (@ipunkbali)


    I know how to remove the bar for my admin, its right in the setting, but I dont know how to remove the bar for my users or registered members?

    I have wp question answer forum with over 6000 users and they all can see the annoying bar. It took the ad space too.

    How to remove this? thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thorned Rose

    (@thorned-rose)

    Try putting this in your theme’s function.php:

    remove_action('init', 'wp_admin_bar_init');

    If you also want to remove the enable/disable option in user preferences, try this instead:

    <?php function hide_admin_bar_settings() {
    ?>
    <style type="text/css">
    	.show-admin-bar { display: none;}
    </style>
    <?php
    }
    
    function disable_admin_bar() {
        add_filter( 'show_admin_bar', '__return_false' );
        add_action( 'admin_print_scripts-profile.php', 'hide_admin_bar_settings' );
    }
    add_action( 'init', 'disable_admin_bar' , 9 );
    ?>
    ipunkbali

    (@ipunkbali)

    thanks, but its not working.

    I logged on as a member, not ADMIN, and still see the bar. 🙁

    Thorned Rose

    (@thorned-rose)

    Which version of the code above did you try?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to remove Admin/User Bar on WordPress 3.1?’ is closed to new replies.