Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Buddypress privacy for tabs

@shanebp

Moderator

For standard BP profile tabs, try:

function zhubr_remove_profile_nav_item( $nav ) { 
	
    if ( ! bp_is_my_profile() )
	$nav = '';
		
    return $nav;
}
add_filter('bp_get_displayed_user_nav_notifications', 'zhubr_remove_profile_nav_item', 20, 1 );
add_filter('bp_get_displayed_user_nav_groups', 'zhubr_remove_profile_nav_item', 20, 1 );
// add additional calls for other tabs

To remove custom tabs, try:

function zhubr_remove_custom_profile_tab() {
	
    if ( bp_is_user() && ! bp_is_my_profile() )
	bp_core_remove_nav_item( 'events' );
	
}
add_action( 'bp_ready', 'zhubr_remove_custom_profile_tab', 25 );
Skip to toolbar