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:
function remove_group_options() {
global $bp;
bp_core_remove_subnav_item($bp->groups->slug, 'members');
bp_core_remove_subnav_item($bp->groups->slug, 'send-invites');
}
add_action( 'bp_setup_nav', 'remove_group_options' );