BuddyPress Member tabs

For removing the Activity tab in the Members Profile area of BuddyPress, one might try this:
add_action( ‘bp_actions’, ‘remove_members_activity_tab’, 5 );
function remove_members_activity_tab() {
global $bp;
bp_core_remove_nav_item( ‘activity’ );

But it’s likely you’ll get an error since the Activity tab is the default. To get around this, you can change the default to something else, with something like:
add_action( ‘bp_setup_nav’, ‘change_settings_subnav’, 5 );
function change_settings_subnav() {
$args = array(
‘parent_slug’ => ‘settings’,
‘screen_function’ => ‘bp_core_screen_notification_settings’,
‘subnav_slug’ => ‘notifications’

bp_core_new_nav_default( $args );

Leave a Reply