Remove Admin Bar For Subscribers and Author User

Remove/Hide Admin Bar For Subscribers and Author User

When we might want open registration on WordPress site so that User can log in and leave comments or submit front-end Post.  But these users shouldn’t need to see the top admin bar as there likely isn’t much use in it for them.

In this case Subscribers and Author User or any other user type shouldn’t  need to see Admin bar on top when its login to the WordPress site.

How To Remove WordPress Admin Bar For Everyone Except Administrators

There are many way to do this, some of small code snippets are shown bellow.

1 . There  is a small code hook in function.php file which enable hide admin bar to loged user except Admin.

2. You can also determine for which users the admin bar is shown. For example the following lines will only display the admin bar for users with administrative privileges.

3. With newer version of WordPress you may need to use the following which will leave the Toolbar available in the Dashboard but hide it on all front facing pages.

 


[paypal-donation]

About Vijay Dhanvai

A passionate blogger by heart and mind, I have been working in this field for 10 years now. A WordPress Professional, web developer and designer who intends to guide his readers about Web Design, WordPress, Blogging, Web Development, and more.

Leave a Reply