How to Remove WordPress Admin Bar

How to Remove WordPress Admin Bar

Spread The Love

Remove WordPress Admin Bar both at the Backend or Frontend:

WordPress automatically displays admin bar at the top of the page when you’re logged in. Whether It is a WordPress dashboard or the front page of your site, it’s still at the top :/ annoyance sometimes. In this Short article, we'll discuss How to remove WordPress admin bar from the Backend as well as frontend.

Put this simple code in Appearance >> Editor >> functions.php file:

function hide_admin_bar_css() {
echo '<style>body.admin-bar #wpwrap
{padding-top: 0px !important; position:absolute; top: 0px;} #wpadminbar {display:none}</style>';

function fb_remove_admin_bar() {

remove_action('init', '_wp_admin_bar_init');
remove_action('wp_footer', 'wp_admin_bar_render', 1000);
remove_action('admin_footer', 'wp_admin_bar_render', 1000);

foreach (array('admin_head', 'wp_head') as $hook)
add_action($hook, 'hide_admin_bar_css');
// Hook
add_action("init", "fb_remove_admin_bar");

If You liked my Article, Then Please Like my Facebook Page for Latest WordPress Tutorials and Latest Updates. you can also join my Newsletter for latest updates. 🙂

  • 16

Himani Bhardwaj

I Himani Bhardwaj founder of Plugins Reviews and also a Professional Developer. I'm a Passionate self-made Girl and plays an active role in the activities of WordPress Plugin Reviews I have also attended Chandigarh WordPress Meetup Sessions. I run an online website geared to help those who wants to Know about WordPress Topmost Plugins, Themes and also who wants to learn about PHP Concepts

Leave a Reply

Close Menu