remove profile tab – correct code?
-
Hi again,
I’d like to remove the Groups tab in a users profile, as I’ve now got new users automatically added upon registration (see here https://buddypress.org/support/topic/how-to-add-new-members-to-groups-automatically/ for how: and a HUGE thanks to @modemlooper and @mrjarbenne for this).
I’ve found previous threads and which have given this:
// removing groups tab from profile define( ‘BP_DEFAULT_COMPONENT’, ‘profile’ ); function bp_remove_nav_tabs() { global $bp; bp_core_remove_nav_item( ‘groups’ ); } add_action( ‘bp_setup_nav’, ‘bp_remove_nav_tabs’, 15 );
which I’ve added into my bp-custom.php
This works great! BUT I’m sure I’ve seen somewhere (can’t track it down now) that you can also declare it as ‘false’ to remove it, so something like this:
$bp->bp_nav['groups']['position'] = false;
Is this because of the recent BP updates? or is it just a different way? Or have I totally imagined it?!
Any insight would be great! Thanks.
- The topic ‘remove profile tab – correct code?’ is closed to new replies.