Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: bp_ajax_querystring filter not runing

@shanebp

Moderator

AJAX search involves javascript – that is probably the issue.
There might be a way to accomplish your task via that filter… if you find it, please share it here.

For blocking aka exclude, I use this action hook: bp_pre_user_query_construct

For you, try something like:

function fencer_members_query( $query_array ) {

   $exclude_ids = // collect all the member ids that don't want to appear, as an array

   if ( ! empty( $exclude_ids ) )
	$query_array->query_vars['exclude'] = $exclude_ids;

}
add_action( 'bp_pre_user_query_construct', 'fencer_members_query', 1, 1 );
Skip to toolbar