How to Hide the WordPress Admin Bar Using a Plugin or Code


There are a few different ways to hide the WordPress admin bar when logged in, using either a plugin or code.

  1. Use a plugin: There are several plugins available that allow you to hide the admin bar, such as "Admin Bar Control", "Disable Admin Bar", and "Simple Admin Bar Removal". Simply install and activate one of these plugins, and the admin bar will be hidden on the front-end of your site.

  2. Use code: You can also hide the admin bar using code by adding the following code snippet to your theme's functions.php file:

add_filter('show_admin_bar', '__return_false');

Additionally, you can also use CSS to hide the admin bar. Add the following code snippet to your theme's style.css file:

#wpadminbar { display: none; }

Please note that, before making any changes to the code, it's highly recommended to backup your site and use a child theme, so that your changes will be preserved when updating the main theme.

Also, you can use a plugin like "Custom CSS and JS" to add the CSS code, which will allow you to keep your custom CSS separate from the theme's CSS, and it won't get lost when theme updates.

YottaSrc Hosting Services

To get free hosting trial, please click here

To get discount more than 80%, please click here

To get free reseller trial, please click here

YottaSrc footer

Other Support Topics

why choose us?

Better Pricing, Fast SSD Storage and Real 24/7
Technical Support.

control panel icon

Managing Your Site Through CPanel With The Latest Version

security icon

99.8% Uptime Guarantee.
So Focus On Your Work!

support icon
24/7/365 Support

Day or night, rain or shine,
our team is here for you!

cloud backup icon
Daily Backup

Daily & Weekly Backup.
Your Files Are Safe!