Roconpaas

Blog

How to Hide Admin Bar in WordPress: 7 Easy Ways

August 10, 2026 Written by Nitish Kumar

WordPress Keeps Logging Me Out

Hide WordPress admin bar when you want a cleaner view of your website after logging in. The admin bar appears at the top of the screen for logged-in users and provides quick links to the WordPress dashboard, posts, pages, themes, plugins, and other tools.

While it’s useful for administrators and site managers, you may not want every logged-in user to see it. For example, removing the admin bar can make sense for membership websites, client portals, custom dashboards, or websites where users should focus on the front end.

In this guide, we’ll cover several ways to hide the WordPress admin bar, including WordPress settings, user roles, plugins, and custom code. We’ll also explain when hiding it makes sense and how to choose the right method for your website.

What is the WordPress Admin Bar?

The WordPress admin bar, also called the toolbar, is the menu that appears at the top of the website when you’re logged in. It gives users quick access to common WordPress tools without having to open the dashboard separately.

Depending on the user’s role and installed plugins, the admin bar may include options such as:

  • Dashboard: Quickly open the WordPress admin area.
  • Edit Profile: Manage your account and profile settings.
  • Edit Page or Post: Jump directly to editing the page or post you’re viewing.
  • New Content: Create a new post, page, product, or other content.
  • Comments: Check and manage comments when the user’s role allows it.
  • Plugin and Theme Shortcuts: Access additional tools added by certain plugins or themes.

The toolbar is useful for administrators, editors, and site managers who regularly make changes. However, it may be unnecessary for subscribers, customers, members, or other users who only need access to the front end of your website. In those cases, hiding the admin bar can provide a cleaner and less confusing experience.

Why Hide the WordPress Admin Bar?

The WordPress Admin Bar is useful for site managers, but it isn’t necessary for every logged-in user. Removing it can make the front end cleaner and give users access only to the features they actually need.

Create a Cleaner Website Experience

The admin bar can take up space at the top of your pages and may clash with your site’s header, navigation, or branding. Hiding it can make the front end feel more like a finished website.

Keep Clients Out of Unnecessary Tools

If clients only need to review or manage specific content, showing them WordPress shortcuts they don’t use can create confusion. Hiding the toolbar keeps their experience simpler.

Improve Membership and Community Sites

Members, customers, and subscribers usually don’t need access to WordPress editing tools. Removing the admin bar can make membership portals, forums, and learning platforms feel more like dedicated applications.

Avoid Conflicts With Custom Designs

Custom headers, sticky navigation, and full-screen layouts can sometimes overlap with the WordPress toolbar. Hiding the bar can prevent unwanted spacing or positioning issues.

Reduce Unnecessary Access

The admin bar itself isn’t a security feature, but removing shortcuts that users don’t need can help keep the interface focused. For stronger security, use proper user roles and permissions to control what each account can actually access.

Method 1: Disable Admin Bar via User Profile Settings

If you only want to hide the WordPress Admin Bar for your own account, you don’t need a plugin or custom code. WordPress includes a built-in setting for this.

Steps

  1. Log in to your WordPress dashboard.
  2. Go to Users → Profile.
  3. Find the Toolbar section.
  4. Uncheck “Show Toolbar when viewing site.”
  5. Click Update Profile to save the change.
  6. Open your website’s front end and check that the toolbar is gone.

This setting only affects your user account. Other administrators, editors, contributors, or subscribers will still see the Admin Bar based on their own settings and user roles. If you want to hide it for multiple users automatically, you’ll need to use a different method.

Method 2: Hide Admin Bar for All Users Except Admins

If you want administrators to keep the WordPress Admin Bar while hiding it from other logged-in users, you can add a small PHP snippet to your site’s theme.

Add this code to your child theme’s functions.php file:

add_action(‘after_setup_theme’, ‘hide_admin_bar_for_non_admins’);

function hide_admin_bar_for_non_admins() {

    if (!current_user_can(‘administrator’)) {

        show_admin_bar(false);

    }

}

This keeps the Admin Bar available to administrators while hiding it from users without administrator-level capabilities, such as subscribers, customers, and contributors.

Before You Add the Code

  • Create a backup before editing theme files.
  • Use a child theme so the change isn’t lost after a theme update.
  • If possible, test the code on a staging website first.
  • Make sure you have another way to access your WordPress dashboard if something goes wrong.

Note: Using a capability such as manage_options is generally more reliable than checking the literal administrator role name because WordPress permissions are capability-based.

Method 3: Hide Admin Bar for Specific User Roles

Want to hide the admin bar for certain roles like subscribers or customers? Extend the logic with conditional checks:

add_action(‘after_setup_theme’, ‘hide_admin_bar_for_specific_roles’);

function hide_admin_bar_for_specific_roles() {

    $user = wp_get_current_user();

    $roles_to_hide = array(‘subscriber’, ‘customer’, ‘contributor’);

 

    if (array_intersect($roles_to_hide, $user->roles)) {

        show_admin_bar(false);

    }

}

This code disables the toolbar only for the listed roles while preserving it for others.

Method 4: Hide Admin Bar on the Front-End Only

You might want to show the toolbar in the dashboard but not on the public-facing site.

if (!is_admin()) {

    show_admin_bar(false);

}

Add this to functions.php to disable the admin bar when viewing the front end of your site.

Method 5: Hide Admin Bar with a Plugin

Not comfortable editing code? Plugins can simplify the process.

Popular Plugins:

  • Hide Admin Bar – A simple plugin with role-based visibility options.
  • Adminimize – Offers detailed control over the admin area and toolbar.
  • WP User Manager – Useful if you’re managing user roles and permissions extensively.

Pros of Using a Plugin:

  • No coding required
  • Granular control
  • Easier updates and reversibility

Cons:

  • Adds another plugin to maintain
  • May introduce conflicts if poorly coded

Method 6: Use CSS to Hide the Admin Bar

For designers who prefer a front-end solution, CSS can be used to visually hide the toolbar.

#wpadminbar {

    display: none !important;

}

body.admin-bar {

    margin-top: 0 !important;

}

Add this to your theme’s stylesheet or through the Customizer > Additional CSS.

Note: This hides the toolbar visually but doesn’t stop it from loading or functioning in the backend.

Method 7: Hide Admin Bar with a Custom Plugin

If you prefer not to modify functions.php, you can create a small custom plugin.

Steps:

  1. Go to wp-content/plugins/ and create a new folder, e.g., hide-admin-bar
  2. Create a PHP file hide-admin-bar.php inside it
  3. Paste this code:

<?php

/*

Plugin Name: Hide Admin Bar

Description: Disables admin bar for all users except admins

Version: 1.0

*/

add_action(‘after_setup_theme’, ‘custom_hide_admin_bar’);

function custom_hide_admin_bar() {

    if (!current_user_can(‘administrator’)) {

        show_admin_bar(false);

    }

}

  • Save and activate the plugin in your WordPress dashboard.

Advanced Control with Capability Checks

You can also control admin bar visibility based on custom capabilities, not just roles. This is useful when your site uses advanced membership or permission plugins.

add_action(‘after_setup_theme’, ‘custom_capability_hide_toolbar’);

function custom_capability_hide_toolbar() {

    if (!current_user_can(‘edit_posts’)) {

        show_admin_bar(false);

    }

}

This approach works well when assigning capabilities with plugins like Members or User Role Editor.

Testing Your Changes

After implementing any method:

  • Log out and test the front-end as a non-admin user
  • Try different roles via incognito or user switching
  • Check if page layout or performance is affected

If using caching plugins, clear your cache after making changes to ensure updates take effect.

When Not to Hide the Admin Bar

Although there are valid reasons to remove the toolbar, consider situations where it might be useful:

  • For administrators, it speeds up workflow
  • Editors may need it for quick access to content tools
  • It provides helpful quick links for site management

In short, avoid disabling it for users who benefit from its functionality.

Conclusion

The WordPress admin bar is useful for administrators and site managers, but not every logged-in user needs to see it. Hiding the toolbar can create a cleaner front-end experience, reduce distractions, and make membership or client-facing websites easier to use.

You can hide the Admin Bar in several ways, including your WordPress profile settings, a small PHP snippet, or a plugin. The best option depends on whether you want to remove it for yourself, specific users, or everyone except administrators.

Before making changes, consider your user roles and how people use your website. With the right setup, you can keep the WordPress dashboard accessible to the people who need it while giving other users a simpler front-end experience.

Hide WordPress Admin Bar FAQs

1. How do I hide the WordPress Admin Bar on the front end?

You can hide the WordPress Admin Bar on the front end by disabling it from your user profile, using a PHP snippet, or installing a plugin. For your own account, go to Users → Profile, uncheck “Show Toolbar when viewing site,” and save the changes. If you want to hide it for other users as well, use a role-based method or plugin.

2. How can I disable the Admin Bar in WordPress?

To disable the Admin Bar, you can use WordPress’s built-in profile setting or add a small PHP function to your site. The profile option only affects your account, while a PHP solution can hide the toolbar for selected user roles or everyone except administrators.

3. How do I turn off the Admin Bar in WordPress?

If you only want to turn it off for yourself, go to Users → Profile in your WordPress dashboard and disable “Show Toolbar when viewing site.” For a site-wide change, you can use custom PHP or a plugin to control who can see the Admin Bar.

4. How do I hide the WordPress Admin Bar from users?

You can hide the Admin Bar from specific users by using their profile settings or control it by user role with custom code. For example, you can keep the toolbar visible for administrators while hiding it from subscribers, customers, contributors, or members.

5. How do I hide the WordPress Admin Bar?

The easiest method depends on who you want to hide it from. To hide it for your own account, use the “Show Toolbar when viewing site” option under Users → Profile. If you need to hide it for multiple users, a role-based PHP snippet or plugin gives you more control.

Avatar photo

Nitish Kumar

Nitish is a Content Strategist and SEO Writer with 6+ years of experience. He specializes in keyword research, on-page SEO, and long-form content that ranks and gets read. He's written across hosting, SaaS, and tech niches, and knows how to take a dense technical topic and turn it into something people actually want to read.

Start the conversation.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Recommended articles

    WordPress

    Why Managed Kubernetes is Future of WordPress Hosting

    Ankit