WordPress GuideAdmin → Hide WordPress Admin Bar

How to hide the WordPress admin bar

Photo of a man in glasses looking down at his phone

Trying to clean up the frontend of your site or simplify things for non-admin users? Let’s walk through a few easy ways to hide the WordPress admin bar—no matter who you want to hide it from.

Get fast, reliable hosting for WordPress

Power your site with the industry’s fastest, most optimized WordPress hosting

What is the WordPress admin bar?

The WordPress admin bar is the dark toolbar that appears at the top of your screen when you’re logged into a WordPress site. You’ll see it while viewing the frontend of your website and when navigating the WordPress dashboard.

By default, it includes links to the dashboard, new post creation, updates, profile settings, and any plugin-specific menus that hook into it.

Change visibility from the user profile

WordPress includes a built-in option to hide the toolbar on the frontend, but it only applies on a per-user basis.

To hide the admin bar for a specific user:

This method is quick but not scalable—ideal if you only need to change the setting for one or two people.

Hide the admin bar for all users except administrators

If you want to automatically hide the toolbar for everyone except admins, a small code snippet does the trick.

To implement this:

Now only administrators will see the admin bar on the frontend. Everyone else gets a cleaner view with no toolbar.

Alternative: Use the Code Snippets plugin to add this safely without editing theme files directly.

Hide the admin bar for everyone

Want to remove the toolbar entirely, for all users including admins? Use this variation:

add_filter(‘show_admin_bar’, ‘__return_false’);

Add this to your functions.php file or a code snippet plugin. It disables the admin bar sitewide on the frontend, regardless of role or user.

This is helpful for locked-down client sites or designs where you want complete frontend control.

Hide the admin bar for specific user roles

For sites using custom roles or more granular permissions, you can hide the toolbar based on user role.

Here’s how:

function hide_admin_bar_for_roles() {
  if (current_user_can(‘editor’) || current_user_can(‘subscriber’)) {
    show_admin_bar(false);
  }
}
add_action(‘after_setup_theme’, ‘hide_admin_bar_for_roles’);

You can customize the current_user_can() checks to include any role(s) you want. This gives you full control over which types of users see the admin bar.

Hide the admin bar for specific users

If you only want to hide the admin bar for one or two user accounts, use the user ID to target them.

Example:

function hide_admin_bar_for_specific_users() {
  if (get_current_user_id() === 5) {
    show_admin_bar(false);
  }
}
add_action(‘after_setup_theme’, ‘hide_admin_bar_for_specific_users’);

To find a user’s ID:

You can modify the condition to target multiple IDs with an array if needed.

Use the Hide Admin Bar Based on User Roles plugin

If you prefer not to deal with code, the Hide Admin Bar Based on User Roles plugin offers a quick and user-friendly way to control who sees the admin bar.

Here’s how to use it:

This plugin disables the admin bar on the frontend only, which is exactly what most site owners want. It’s especially helpful on client sites, membership communities, or contributor-heavy blogs where only admins need access to the full dashboard.

Hide the admin bar on specific pages or templates

Need to show the admin bar in general, but remove it from certain pages? WordPress conditionals make that easy.

Example: hide the admin bar on the homepage only:

function hide_admin_bar_on_homepage() {
  if (is_front_page()) {
    show_admin_bar(false);
  }
}
add_action(‘after_setup_theme’, ‘hide_admin_bar_on_homepage’);

You can use any standard WordPress conditional tags like is_page(), is_single(), or is_page_template() to target specific content types or templates.

This approach works great when you’re designing landing pages or previews where the admin bar could break layout or be distracting.

Should you hide the admin bar? Pros and cons

Before removing the toolbar, it’s worth thinking through how your users actually interact with WordPress.

Why hide it:

Why keep it:

If you’re running a membership site, client site, or a minimalist theme, hiding the toolbar makes sense. But for collaborative publishing teams or frequent content editors, the convenience may outweigh the clutter.

Additional resources

How to use your WordPress admin login page →

How to find, use, and troubleshoot your admin page

WP-content: uploads and more (a beginner’s guide) →

Learn how to manage and troubleshoot WordPress media uploads through the wp-content/uploads directory.






Easy WordPress website maintenance tips →

7 simple steps to keep on regular rotation