Removing Items from Buddypress Profile Menu Without Removing Functionality?
-
Hi Everyone
I have been struggling with this for a few weeks now. I’m hoping someone can help out.
So the main profile menu on the Buddypress profile / member area (activity/profile/friends/groups/forum etc). I need to remove some of those items.
Some items (e.g. forum) I need to remove from there because I only want to have forums in groups, not a central forum. So I need to retain the forum functionality, just not have that link on the user areas.
Other items I don’t need because I have already set them up on the site main navigation at the top Facebook style (e.g. messages, notifications, settings) and no need to duplicate them on the Buddypress member area menu.
I have tried using CSS, however this retains the links to the items in the page source. So this is not ideal.
I have tried using jQuery – same results as CSS.
I have tried using unset – but this actually removes the functionality, not just the links on the member area nav.
I have tried using bp_core_remove_nav_item. However this has some side effects. The links to the user messages / notifications / settings at the top of the site are created from the Buddypress options under Appearance > Menus. It seems when you remove those items using bp_core_remove_nav_item, it removes them from the top too. I only want to remove them from the Buddypress member area navigation bar.
I tried to be clever, and recreated those top menu items using a shortcode to the appropriate user. The links are there and correct. However, one bp_core_remove_nav_item is added – it also seems to disable the various functionality. So now if I go to messages for example, I just get a 404 page. Remove the bp_core_remove_nav_item function and the page / link works correctly again. So it seems bp_core_remove_nav_item is actually removing the functionality of the items on the nav, instead of removing a navigation item, that the function name kind of suggests.
I can’t recreate that menu manually with HTML, because remaining items (e.g. Media, Groups, Friends etc) have a little dynamic number to the side of each icon indicating how many items are in that area.
Can anyone please give me some pointers as to how I might remove some items just from that Buddypress member area navigation bar – without leaving links in source code, without removing ALL instances of navigation to those items, and without removing the actual functionality?
I’m happy to hack the hell out of the core files if needed, I just can’t seem to find anywhere where I might be able to make that change.
Any help with this would be greatly appreciated, many thanks.
-
Hello, did you find a solution, to remove menu items, but keep the functionality? I just want to move the menu items to a new menu location, not stop using the features. CSS did not seem to work to hide the menu item, as it still put 3 items into the “…” extended menu on the user profile.
After posting this, I found CSS that works to remove the menu items, if it helps anyone else.
https://premium.wpmudev.org/forums/topic/how-to-customize-or-delete-buddypress-standard-menus
For the site CSS I set:
a#user-notifications {display : none !important}
a#user-invite-anyone {display : none !important}
a#user-settings {display : none !important}
- You must be logged in to reply to this topic.