Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: [Resolved] Disable Groups Activity Stream, direct to members page instead

@danbp

Participant

@sbampfylde,

in other words, you want to change the landing tab when visiting one of these groups.

Each group screen as his own search filter. So if you are on the group forum screen, you see the forum activity filter. When you are on the group members screen, you see the group members search filter. And so on…

So no matter about filtering, if you bring the visitors to the right screen as soon as they arrive on the group, they get the correct filter.

FYI function is theme dependant and bp-custom is completely independant from bp updates and will work even if you change your theme.
Here’s the code you can use (in functions.php or bp-custom.php)

function bpfr_custom_group_default_tab($default_tab){
	/**
	 * class_exists() is recommanded to avoid problems during updates 
	 * or when Groups Component is deactivated
	 */
	if ( class_exists( 'BP_Group_Extension' ) ) : // 
	
	$group=groups_get_current_group();//get the current group
	
	if(empty($group))
	return $default_tab;
	
	switch($group->slug){
		
		case 'Public Events': // group name (slug format)
		$default_tab='members';
		break;
		
		case 'Private Investigations':
		$default_tab='members';
		break;
		
		case 'another group':
		$default_tab='admin';
		break;
		
		default:		
		$default_tab='home';// the original default landing tab
		break;
		
	}
	
	return $default_tab;
	
	endif; // end if ( class_exists( 'BP_Group_Extension' ) )
}
add_filter('bp_groups_default_extension','bpfr_custom_group_default_tab');

Add or remove the “case” part into the switch to your needs. Don’t forget to modify the groups name to yours.

Skip to toolbar