@jasonsubers
4 years, 3 months ago
You can use bp_parse_args() to do that.
So for the members loop, the filters are
bp_before_has_members_parse_args bp_after_has_members_parse_args
I needed to only show members of a certain type in my directory, so this worked for me:
function only_members( $retval ) { $retval['member_type'] = array( 'type1', 'type2' ); return $retval; } add_filter( 'bp_before_has_members_parse_args', 'only_members' );