Skip to:

Disable WP Admin Bar While Maintaining BP Dropdown Options

  • zsauce


    Hello everyone!

    I’ve been searching for hours on every site I can possibly think of, and I’ve looked at tons of articles in regards to the admin bar, but haven’t found any similar issues.

    The website I am currently building I am using BuddyPress version 2.8.2, BuddyBoss theme version 2.3.3, and WordPress version 4.7.4.

    I want to hide the WordPress admin bar from all users except the administrator. That’s simple, as I have found many different ways to do it (coding, plugins, etc).

    The issue I am running into is when I hide the WordPress admin toolbar (regardless of method, ie. coding or plugin), it also removes all of the dropdown options for the BuddyPress admin toolbar (activity, profile, friends, messages, etc) that shows up with the BuddyBoss theme. I originally thought it was a coding issue in the BuddyBoss theme, but from the information I found, the admin bar that shows up with the theme comes from the BuddyPress plugin.

    I imagine that the BuddyPress plugin uses the same call function (I don’t code much so I don’t know the proper term) to get it’s drop down menu as WordPress does for it’s admin toolbar. My issue is I can’t figure out where/what that is so that I can change it to something custom.

    Any assistance would be greatly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)

  • zsauce


    This is the bar and menu I am trying to get rid of:
    WordPress Admin Bar

    While this is the bar I’m trying to maintain, but all of these options disappear when I hide the WordPress Admin Bar above:
    BuddyPress Admin Bar




    WP’s toolbar is not part of BP, and not part of your theme. This bar belongs to WP.

    I suggest that you don’t remove(or deactivate) the whole bar, but only remove any menu item belonging to WP, except the “howdy” menu where BP install his sub-menu items.

    To do this, you have to use some custom functions related to wp_admin_bar class.

    Use $wp_admin_bar->add_node or $wp_admin_bar->remove_node

    Codex reference:

    …and a little tutorial, in case of!

    How to Customize the WordPress ToolBar

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar