Remove page from Buddypress buddybar


I am trying to find the location of the file that controls the Buddypress page bar at the top of the website I built. When I go into the Groups section and then click on a group, a page called 'membership' is added to the top bar, pushing my search bar out of position. I would like to remove this new page, as I do not need it, and when you click on it, it doesn't go anywhere useful anyway.

I found the location of the menu in my 'top-bar.php' >> bp_get_loggedin_user_nav() function. I just don't know how to edit this function in order to remove the appropriate page.


  • mediastead

    Well, you were correct. I found the piece of code that spits the menu out ...

    echo apply_filters_ref_array( 'bp_get_loggedin_user_nav_' . $nav_item['css_id'], array( '<li id="li-nav-' . $nav_item['css_id'] . '" ' . $selected . '><a id="my-' . $nav_item['css_id'] . '" href="' . $nav_item['link'] . '">' . $nav_item['name'] . '</a></li>', &$nav_item ) );

    Do you think you could help me remove the memberships page from the menu? Perhaps an if statement or some special function that can be created base off of the code above?

    This is my only lead...

    Oh, also just to mention, I am using the Buddypress Social template.


  • aecnu

    Greetings mediastead,

    Thank you for letting us know and it is greatly appreciated that you indeed posted the coding.

    You had mentioned that you are using the Buddy Press Social Theme?

    Do you have it configured in the proper Parent/Child relationship?


    The problem with this coding is that it will have to be hard coded out because Buddy Press is not giving us any options here i.e. Parent/Child etc.

    Or not any that I am aware of.

    With that said and in regards to the removal of "membership" from the menu, and the best practice thereof, I will see if I can get the lead developer in here with his invaluable insight into this theme for his advice/advise for us.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • aecnu

    Greetings mediastead,

    Thank you for the screen shot which certainly tell a tale - that this Membership and Memberships menu items do not come standard with Buddy Press nor Social and I have possibly been chasing my tail without knowing it.

    You tell me where these items are coming from?

    Here is my production server and as you will see they are not present there in any way shape or form:

    Now it is time to go into full blown trouble shooting mode to find out where these are coming form conclusively.

    Standard plugin trouble shooting protocol - first to switch to the Twenty Eleven theme just long enough to check for the problem - if the problem still exists next involves deactivating all plugins except the plugin in question and then see if the issue still exists.

    If it does not, then you want to activate plugins one at a time testing in between to see if the membership menu item disappears.

    You will know what is causing the menu item when you shut it off.

    Please advise how these membership and memberships menu items are being rendered - it is obviously not form Buddy press nor the Social theme.

    Cheers, Joe

  • PC


    Greetings and thanks for being a great community member.

    We haven't heard from you on this one for long and I am doing a regular followup to see if there is still something we can assist you on this thread.

    Just to manage the support issues more efficiently, I am marking this thread as resolved for now however this is not being done to avoid your questions in any ways.

    Please feel free to mark this is "Not resolved" in case you have further questions and we would be back on it.

    Thanks a lot for being with WPMU DEV.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.