BuddyDev

Search

WordPress Admin Bar

  • Participant
    Level: Enlightened
    Posts: 31
    Steven May on #30267

    What Plugin From your site’s portfolio will Hide the WordPress Admin Bar from all users except admin?

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2459
    Ravi on #30273

    Hello Steven,

    Thank you for posting. Just to hide the admin bar does need any specific plugin. You can hide it with the following code in your theme “functions.php”

    
    add_filter( 'show_admin_bar', function () {
    	return is_super_admin();
    } );
    
    

    It will only show admin bar to admin only.

    Regards
    Ravi

You must be logged in to reply to this topic.

This topic is: not resolved