Remove The WordPress Admin Bar – Disable Admin Bar For All Users.

add_filter('show_admin_bar', '__return_false');

In this tutorial you’re going to learn how to remove the WordPress admin bar. That is the bar that appears at the top of the website whenever anyone is logged in. The admin bar will still be visible in the admin area of your website, but not on any of the public facing pages. This WordPress customization is actually quite easy to do and I explaine you two ways to do it.

One is through the WordPress admin dashboard. The other is through the File Manager in your hosting account cPanel. First, let’s do it through the WordPress dashboard. The first thing you’ll have to do is log into your WordPress site, then hover over Appearance in the left hand menu. In the flyout menu that appears click on Editor. [If there is no Editor link then you’ll have to hide WordPress admin bar through the cPanel File Manager or FTP.] Once you’re in the editor find the functions.php file of your theme. All files in the theme root are listed on the right hand side of the Editor. Click on functions.php to open it. Paste the following code into the functions.php file:

add_filter('show_admin_bar', '__return_false');

add_filter(‘show_admin_bar’, ‘__return_false’); Then save the file. That is how easy it is to disable admin bar, hide admin bar and remove admin bar. To do this same thing via your hosting cPanel account, log into your hosting account. Click on the File Manager option and open the root of the website you want to work one. Once the root folder opens double click on wp-content, then double click on themes. Next, double click on the folder of your active theme to open it. Find the functions.php file, single click on it and click on the Edit button. That will open the file for editing. Paste the following code into the functions.php file:

add_filter('show_admin_bar', '__return_false'); 

Then save the file. And you’re all done. You now know how to disable WordPress admin bar and hide WordPress admin bar. I hope this information helps you! If you have any questions leave a comment below

Author: ashraful

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x