WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Hiding admin bar in WordPress 3.3 (63 posts)

  1. motocomdigital
    Member
    Posted 2 years ago #

    I like the admin bar in the backend, it's a nice touch.

    But on most of my projects I like to keep my front end clean with my UI only, so no admin bar. And it's a pain to remember to un-tick the option in the user profile when setting up new users.

    Ipstenu's filter worked for me, he said it only works in the TwentyEleven theme, but seems to work for me on my custom themes.

    Add this too your functions.php

    // Remove Admin Bar Front End
    add_filter('show_admin_bar', '__return_false');

    Thanks @Ipstenu!

  2. Lee Rickler
    Member
    Posted 2 years ago #

    This and many other options can be turned on/ off/ changed via this plugin:
    http://wordpress.org/extend/plugins/point-and-stare-cms-functions/

  3. Makarand Mane
    Member
    Posted 2 years ago #

    I written this code to hide admin bar from my theme

    <?php global $user_ID; if( $user_ID ) :  if( current_user_can('level_10') ) : show_admin_bar(true); else : {  show_admin_bar(false); } endif; endif;
    ?>

    http://www.yogeshbabar420.com

    after it is showing blank strip above body to remove that i modified above code

    <?php global $user_ID; if( $user_ID ) :  if( current_user_can('level_10') ) : show_admin_bar(true);
    		 else : {  show_admin_bar(false); echo '<style type="text/css" >#wpadminbar{display:none; visibility: hidden;}</style>'; } endif; endif;
    		?>

    but is also giving me same result

    tell me anybody how to remove that strip.

Topic Closed

This topic has been closed to new replies.

About this Topic