Header Ads Widget

Responsive Advertisement

How to Disable WordPress ADMIN BAR for All Users Except Administrators

 How to Disable WordPress ADMIN BAR for All Users Except Administrators



Today I’ll Tell you That How to Disable WordPress Admin bar for All Users Except Administrators Only. There is many Ways to Do this But Today I’ll tell 2 ways to hide this on your website

and told you very simple and easiest ways to solve this problem.

So, Let’s Start,

1st Method: How to Disable WordPress Admin Bar

In This Method You Can Be Easily To Resolve this Problem to Using Your WordPress Site Dashboard.S

Let’s Explain it.

Go to you WordPress dashboard > Click on Appearance Button > Click On Theme Editor > Find Theme (Functions.php) Option to the Theme Folders that’s are displayed by Right side of your

Theme Editor > Then you can See the Functions Code

Then Scroll down and paste the Given code in the last line.

Add_filter(‘show_admin_bar’, ‘__return_false’);

And Then > Click on Update Button to save this Code in your theme Functions.

Finally, You Done this Now You can Refresh Your Website

Home page and Checked Your Admin Bar Magically Removed For All users.

but if you can Refresh you WordPress Dashboard Page You can See Your Admin Bar Shown Here Perfectly.

HOW TO ADD FACEBOOK LOGIN BUTTON FOR SUBSCRIBERS TO WORDPRESS SITE

Let’s We Move on the 2ND WAY, and Let’s do it again But The works is same,

Our Mission is How to Disable WordPress ADMIN BAR for All Users Except Administrators.

So Let’s Start.

2nd Method: How to Hide Admin bar from your WordPress Website

This way is Also very Simple and Quick way to Remove The admin bar

but for this Way Follow my All steps very carefully, So Let’s do it.
Open Your Web Hosting Cpanel In a New tab > Find File manager And

Click on it > When File manager Open you can see many Folders here.

Here You Find Public_html And You Can see a Plus Icon with Public_Html

Then Click on + Icon and You can see more Folders that’s are the sub Folders of Public_Html. Now Find Wp-content Folder and Then Also Click on + Icon and Open More Folders Of WP-content.

you can See Here Theme Folder Then Click on Theme Folder or Press on Plus Icon. Now You can see your Theme Name Folder For example Estra Theme that’s You installed on your WordPress. So, Click on Theme folder that’s are active, And You can see the Theme Coding in different folders.

Now Here Find Function. Php name Folder and Open with Edit Tab and Pasted Given code in the last Empty Line.

Add_filter(‘show_admin_bar’, ‘__return_false’);

After Pasting This Code See above or Find Save Changes Button, Press It and Save This code. Now Go back to your website WordPress Dashboard and Refresh.

And you see Your Admin Bar is Available for Your Dashboard

but Now you go to your Website and Refresh Your website page

you’ll see Admin bar is permanently Disabled for Subscribers. Hurry we Done it.

If you Like my Content then please Share your Experience about this article in Comment Box or

Follow me on YouTube and Other Social Media Platforms, Like Twitter, Instagram, Facebook, Tiktok.

Thank you So much to Visit My Website.

Post a Comment

0 Comments