7 min read

How to Hide the WordPress Toolbar for BuddyPress Members

Shashank Dubey
Content & Marketing, Wbcom Designs · Published Jun 7, 2024 · Updated Aug 29, 2026
WordPress Experts by Wbcom Designs - galaxy background with handwriting text

The black WordPress toolbar across the top of the page is fine for editors and admins. For a community member who signed up to join a group, it is confusing, it looks like a bug, and it offers links to a dashboard they should never need. Hiding it for members takes one filter, or a single checkbox if you prefer a plugin, and this guide shows the right way to do each so you do not lose the toolbar for yourself in the process.

We will cover the built-in BuddyPress setting (and its limits), the per-user WordPress option, a role-based code snippet that works on BuddyPress, BuddyBoss and plain WordPress, two maintained plugins, and the follow-up steps that matter more than the toolbar itself: keeping members out of wp-admin and giving them somewhere better to go.

Why the toolbar shows for members in the first place

Why members see the WordPress toolbar: on by default, BuddyPress adds items, hiding it does not block wp-admin

WordPress shows the toolbar to every logged-in user by default, regardless of role. The per-user preference lives on the profile screen as Show Toolbar when viewing site, and it is ticked for each new account. BuddyPress does not add a toolbar of its own any more (the old BuddyBar was retired years ago); it adds its own menu items to the WordPress toolbar, such as Activity, Profile, Groups and Notifications.

That explains the two things people get wrong. First, unticking “Show the Toolbar for logged out users” under Settings → BuddyPress → Options does nothing for logged-in members; it only controls whether visitors see a Log In link bar. There is no “logged-in users” checkbox in current BuddyPress versions (14.x, 12.x and 11.x). Second, hiding the toolbar does not stop anyone reaching /wp-admin/ by typing the URL. Subscribers will land on a stripped-down dashboard with a profile page. If you care about that, handle it separately (we cover it below).

Method 1: the per-user profile setting

For a handful of accounts this is the no-code answer. Go to Users → All Users, edit the user, untick Show Toolbar when viewing site, save. The user can also do this themselves from their own profile.

It does not scale. New registrations get the toolbar again, and you cannot bulk-edit it from the Users screen. The value of knowing about it is the opposite direction: when a client says “the toolbar disappeared for one admin,” this checkbox is almost always why.

Method 2: a role-based filter (our default)

The WordPress-documented way to hide the toolbar is the show_admin_bar filter. The developer reference calls returning false from it “the recommended way to hide the admin bar.” Put this in a child theme’s functions.php or, better, a small site-specific plugin so it survives theme changes.

/**
 * Hide the toolbar for everyone who cannot edit posts.
 * Admins, editors and authors keep it; subscribers and custom
 * community roles lose it.
 */
add_filter( 'show_admin_bar', 'wbcom_hide_toolbar_for_members' );

function wbcom_hide_toolbar_for_members( $show ) {
    if ( ! is_user_logged_in() ) {
        return false;
    }
    if ( current_user_can( 'edit_posts' ) ) {
        return $show;
    }
    return false;
}

A few choices worth explaining. We test a capability rather than a role name, because roles vary between sites (membership and LMS plugins add their own) while edit_posts cleanly separates content staff from members. If you want only administrators to keep the toolbar, check manage_options instead. And we return the original $show value for staff rather than a hard true, so an editor who has personally switched it off in their profile still gets their preference.

If you use the Code Snippets plugin, paste the function there with the scope set to “Run everywhere.” Do not wrap this in an init action; the filter is applied when WordPress decides whether to load the toolbar, and adding it directly from the plugin or theme file is correct.

Variant: hide it only outside wp-admin

The filter cannot hide the toolbar inside the dashboard; that is by design. If an editor wants a clean front end but the usual toolbar when editing, the filter above already does that, since it only affects front-end rendering.

Variant: hide it on specific BuddyPress pages only

Some clients want members to keep the toolbar site-wide but lose it on the activity and profile screens where it clashes with a sticky community header. BuddyPress conditionals make that simple:

add_filter( 'show_admin_bar', function ( $show ) {
    if ( function_exists( 'is_buddypress' ) && is_buddypress() && ! current_user_can( 'manage_options' ) ) {
        return false;
    }
    return $show;
} );

Method 3: a plugin, when you cannot touch code

Comparison of three ways to hide the WordPress toolbar for BuddyPress members: profile setting, filter, plugin

Two free plugins on WordPress.org cover this well and were both updated for WordPress 7.x at the time of writing.

PluginWhat it doesBest for
Hide Admin Bar Based on User Roles (20,000+ installs)Checkbox per role under Settings → Hide Admin Bar; also has a per-user override and an option to disable for logged-out visitorsSites with several custom roles where you want a UI
Hide Admin Bar from Non-Admins (10,000+ installs)No settings; activate and everyone except administrators loses the toolbarSmall sites where only one person administers WordPress

With the role-based plugin, tick Subscriber plus any role your membership or LMS plugin creates (for example “Student” from LearnDash-adjacent setups or “Customer” from WooCommerce). Leave Administrator and Editor unticked. Test in a private window with a subscriber account before you consider it done.

Our honest take: if a developer is already involved, the ten-line filter is preferable. It is one fewer plugin to update and it behaves identically on staging and production. If a community manager runs the site alone, the plugin is fine.

What to do instead of the toolbar

The toolbar was giving members three useful things: a way to log out, a link to their profile, and notifications. Remove it without replacing those and support tickets follow.

  • Log out and profile links. Community themes handle this in the header. BuddyX and Reign both ship a user menu with avatar, profile, settings and logout, plus a notification and message dropdown, so the toolbar is redundant from day one. On a general-purpose theme, add a BuddyPress “logged-in” menu via Appearance → Menus, where BuddyPress registers profile links as menu items.
  • Notifications. The Nouveau template pack shows a notification count on the member’s profile nav; the theme header dropdowns mentioned above surface it globally.
  • Edit links for staff. Editors lose nothing because the filter leaves their toolbar alone.

Keep members out of wp-admin as well

Hiding the toolbar is cosmetic. A subscriber typing /wp-admin/ still gets the dashboard, and on a community site that is where they discover a profile page that duplicates (and sometimes conflicts with) the BuddyPress one. Redirect them back to the front end:

add_action( 'admin_init', 'wbcom_members_out_of_admin' );

function wbcom_members_out_of_admin() {
    if ( wp_doing_ajax() || current_user_can( 'edit_posts' ) ) {
        return;
    }
    if ( function_exists( 'bp_loggedin_user_url' ) ) {
        wp_safe_redirect( bp_loggedin_user_url() );
    } else {
        wp_safe_redirect( home_url( '/' ) );
    }
    exit;
}

Two details matter here. The wp_doing_ajax() check is not optional; admin-ajax.php runs through admin_init, and without the guard you will break every front-end AJAX feature for members, including the activity stream. And bp_loggedin_user_url() is the BuddyPress 12+ way to get the profile URL; on older installs use bp_loggedin_user_domain().

If you also want role-based login redirects (members to the activity stream, instructors to a course dashboard), our free WB Login Logout Redirect plugin handles that from a settings screen without code.

Troubleshooting

The toolbar is gone but there is a 32px gap at the top

Something is still outputting the admin-bar body class or the html { margin-top: 32px } rule. Usually a theme hard-codes the margin. Search the theme CSS for admin-bar and margin-top: 32px, or add html { margin-top: 0 !important; } in a child theme scoped to body:not(.admin-bar).

Admins lost the toolbar too

Either the capability in your filter is wrong, or a plugin (often a membership plugin) has its own “hide admin bar” setting that overrides yours. Check Users → Your Profile first, then deactivate plugins one at a time on staging.

The toolbar flashes and then disappears

That is a caching plugin serving a cached copy of the page to logged-in users, then JavaScript removing it. Exclude logged-in users from the page cache (most caching plugins have this as a checkbox) rather than papering over it with CSS.

BuddyBoss Platform

BuddyBoss has its own toggle under BuddyBoss → Settings → General → Toolbar with a “Hide toolbar for non-admins” style option. Use that instead of the BuddyPress setting, but the show_admin_bar filter works there too if you need capability-level control.

Frequently asked questions

Will hiding the toolbar affect SEO or performance?

Not SEO; search engines never see it. Performance, marginally for the better, since WordPress skips enqueuing the toolbar’s CSS and JS on pages where it is hidden.

Can I hide it for logged-out visitors only?

Logged-out visitors do not see the WordPress toolbar at all unless BuddyPress’s “Show the Toolbar for logged out users” option is ticked. Untick it under Settings → BuddyPress → Options.

Does this work on multisite?

Yes. Network-activate a small plugin containing the filter so it applies to every site, and remember that super admins hold manage_options everywhere, so they keep the toolbar.

What we’d do

Four-step plan to remove the WordPress toolbar for members: filter, wp-admin redirect, theme links, subscriber test

Add the capability-based show_admin_bar filter and the admin_init redirect to a site-specific plugin, confirm the theme header gives members profile, notifications and logout, and test with a subscriber in a private window. That is a fifteen-minute job that removes one of the most common “is this site broken?” questions new members ask. If you would rather not touch code, the role-based plugin plus the login redirect plugin get you to the same place.

Shashank Dubey
Content & Marketing, Wbcom Designs

Shashank Dubey, a contributor of Wbcom Designs is a blogger and a digital marketer. He writes articles associated with different niches such as WordPress, SEO, Marketing, CMS, Web Design, and Development, and many more.

Related reading