[resolved] Hide Admin menu bar from front side in wordpress 3.3 (2 posts)

  1. Makarand Mane
    Posted 4 years ago #

    In below code i hidden admin menu bar from my web site on front end... using show_admin_bar(false);

    Below code only shows admin bar on front end for administrator user..
    if other than admin user logs to web site then admin bar will not be displayed...

    i added below code to my themes header yogeshbabar420.com..

    <?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" >html{margin:0 !important;} #wpadminbar{display:none; visibility: hidden;}</style>'; } endif; endif;
  2. InderjeetSohal
    Posted 4 years ago #

    Thanks u r great.

Topic Closed

This topic has been closed to new replies.

About this Topic