Share Article To

So now our discussion topic is “How can we disable admin bar for all except admin”, let us see the solution of this

Paste this code in your theme’s functions.php file or your site-specific plugin.

/* Disable WordPress Admin Bar for all users but admins. */
if (!current_user_can('administrator')):

Yes, that’s it, try and put comment below that whether the above solution works for you or not 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *