How to disable wordpress admin bar from front end

Recently we have built a social community site in wordpress and we have to create different levels of users according to their membership.So, we dont want to allow users to access admin panel and display admin bar according to their accees level.Here, we will show you how to achieve it.

 

Disable wordpress admin bar for all users

There are different ways to achieve it.Just put the below code snippet in your theme’s functions.php

 

Alternately, you can  use show_admin_bar filters:

 

Another option, just add the below CSS code in your theme’s style.css:

 

Disable WordPress  Admin Bar for All Users Except for Administrators

 

Disable and Customize the WordPress Admin Bar using Plugins

Also, you can use below mentioned plugins for same.

Hide Admin Bar
Admin Bar Disabler
Auto Hide Admin Bar
Hide Admin Bar from Non-Admins
Remove Admin Bar
Hide Admin Bar From Front End

 

Add a Comment

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