This will remove the ‘Members’ link on group pages:
function bp_group_remove_members_tab() {
if ( ! bp_is_group() )
return;
global $bp;
if (isset($bp->groups->current_group->slug) && $bp->groups->current_group->slug == $bp->current_item) {
$bp->bp_options_nav[$bp->groups->current_group->slug]['members'] = false;
}
}
add_action( 'bp_setup_nav', 'bp_group_remove_members_tab', 999 );
You can put it in your theme/functions.php
also – I think there is probably a better way to code this… ?
Thank you very much. Pity that the theme needs to be hacke as, presumably, this will have to be added every time the theme is updated – but it is a good start. Thanks again
Pity that the theme needs to be hacke as…
To avoid that, you should be using a child theme.
Or you could put the code in bp-custom.php.
Oh good… so am I right in thinking that bp-custom.php is recognised bby bp and will be read if it is present? BTW… your code works just fine. Thank you!