Remove the WordPress Admin Bar

Remove the WordPress Admin Bar

Dzhuneyt Ahmed - Author of this post
Dzhuneyt Ahmed

Posted · 1 min read

The WordPress admin bar, introduced in version 3.1 is cool and useful, but sometimes it gets in the way of admins and other logged in users (especially to developers, who are currently working on a website’s header).

Here is a simple PHP snippet that will get rid of the admin bar. You can bring it back by just removing these three lines.

wp_deregister_script('admin-bar'); wp_deregister_style('admin-bar'); remove_action('wp_footer','wp_admin_bar_render',1000);

These go in your theme’s functions.php file.

Dzhuneyt Ahmed

Dzhuneyt

Helping teams build reliable cloud infrastructure — without the bloated bill.

Social

My Other Blogs

© 2026 Dzhuneyt Ahmed. All rights reserved.