
If you’re using WordPress, you’ve probably noticed the admin bar that appears at the top of your site when you’re logged in. While it’s useful for quick navigation, some website owners prefer a cleaner front-end experience and want to hide it—either for themselves, their clients, or certain user roles.
In this guide, I’ll show you three easy ways to hide the WordPress admin bar:
Let’s get started.
Why Hide the WordPress Admin Bar?
The admin bar provides shortcuts to important areas like the dashboard, new post creation, and profile editing. However, you might want to hide it because:
Method 1: Hide the Admin Bar Using a Plugin
If you’re not comfortable editing code, using a plugin is the easiest option.
Steps:
This method is beginner-friendly and doesn’t require coding knowledge.
Method 2: Hide the Admin Bar with PHP Code
If you prefer a lightweight solution without using plugins, you can add a small PHP snippet to your theme.
Steps:
// Disable admin bar for all users except administrators
add_filter('show_admin_bar', function($show) {
if (!current_user_can('administrator')) {
return false;
}
return $show;
});
This snippet hides the admin bar for all users except administrators. If you want to hide it for everyone, you can simply use:
add_filter('show_admin_bar', '__return_false');
⚠️ Note: Always create a child theme or use a site-specific plugin before editing functions.php. This ensures your changes won’t be lost during theme updates.
Method 3: Hide the Admin Bar from User Settings
WordPress also allows you to disable the admin bar manually for each user.
Steps:
This is a simple way to hide the admin bar for specific users without affecting everyone.
Which Method Should You Use?
Final Thoughts
The WordPress admin bar is helpful for many, but not always necessary. Whether you choose a plugin, PHP code, or user settings, hiding the admin bar is quick and easy.
By following this guide, you can create a cleaner and more professional experience for your users—and keep full control over your WordPress site’s appearance.
If you found this tutorial helpful, feel free to share it! And if you want more WordPress tips, tricks, and tutorials, check out blog page.