Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello
    In wordPress admin side, Go to Users->Profile and uncheck the toolbar option.

    Thread Starter Imran Kanjoo

    (@imran_kanjoo)

    Hi @kajalgohel, the option you suggested is for the logged in users to set the toolbar options. The current toolbar/admin bar about which I am asking is appearing even the users are not logged in. When nobody has logged in their is no profile.

    Hello @imran_kanjoo

    You can add below code into your functions.php file.

    if ( !function_exists('noSubsAdminBar') ) {
     function noSubsAdminBar() {
       if(! is_user_logged_in()) {
         show_admin_bar( false );
       }
     }
    
     add_action( 'wp_loaded', 'noSubsAdminBar' );
    }

    Hope this is useful. ??

    • This reply was modified 2 years, 10 months ago by Kajal Gohel.
    Thread Starter Imran Kanjoo

    (@imran_kanjoo)

    Thank you. Its resolved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Disable Admin Bar WordPress 5.9’ is closed to new replies.