How to hide WordPress admin bar

Hello friends,

How to disable or hide the admin bar in your WordPress website or application. Just put the blow line of code in your current WordPress theme’s function.php file. It will prevent the toolbar from rendering on the front end of your site.Recently working on a membership site, we had to create multiple level of users. We did not want the users to have access to the WP-Admin panel because it was not customized for their experience.

Disable Admin Bar for All Users Except Admin. you can directly put this below code

 

you can manage this according to users. you can change the if condition of users where you want to display admin bar

 

The following lines will only display the admin bar for users with administrative privileges.

 

There is also filter in wordpress that also remove the admin bar see below :

 

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face – we are here to solve your problems.

I, Dayanand Saini,the founder and chief editor of www.webtechsource.com,have been working as a software engineer from last 4+ years. It's my hobby to learn new things and implement on live environment.

One Reply to “How to hide WordPress admin bar”

  • I loved as much as you’ll receive carried out right here.

    The sketch is attractive, your authored material stylish.
    nonetheless, you command get bought an nervousness over that you wish be delivering the following.
    unwell unquestionably come further formerly again as exactly
    the same nearly a lot often inside case you shield this hike.

Leave a Reply

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

− 6 = 3

%d bloggers like this: