Basically if you see the picture below there are 5 tab items in my groups page:
Now, I want to be able to remove some of them. I want to be able to remove “Members” and “Send Invites” (for instance).
This is on the frontend groups page. When you select a group and go to view it.
I don’t want to edit core files really, is there any other way to do this? Maybe a remove_action?
Thank you.
Managed to crawl through the core code and find this function:
bp_core_remove_subnav_item
So you can do something like this:
The answer above does not work in 1.5
needs to become
To support both version of bp use:
This is working for me in BP 2.0.1:
The functions for removing the nav and subnav items are similar except that the subnav function requires an additional argument to specify the main nav, of which it is a sub-item.
Thus, the following code removes the main nav item “forums” and also removes the “change-avatar” subnav item from the main nav item “Profile”:
I’ve tested this in the bp-default theme in BP 2.0.1 and also in my own site.
Hope it helps 🙂