How to Remove Admin Bar For Subscribers

Prem Tiwari - - WordPress Snippets

Sometimes we want to remove the admin tool from front-end websites based on the user role and permission on your site. In this post, I have explained the simple and easy codes to remove admin toolbar on the user role basis.


Show admin bar only for administrator

Use the below code at the end of the wp-content/themes/your-theme/functions.php file. It will remove the Admin toolbar for all users except the Administrators.

Show admin bar only for admins and editors

Below code will remove the Admin bar from front-end sites for Administrators as well editors of your web

Do you like & share this article with your friends, and don’t forget to follow us on Facebook and Twitter to learn cool WordPress tutorials.

About: Prem Tiwari

Prem Tiwari is the founder of and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.

Tags: , , , ,

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.