Intercept Ajax Query

//Members query switch
function lmc_members_query($members_query){
parse_str($members_query,$query_vars);
switch($query_vars['scope']){
case 'fans':
$members_query .= "&search_terms=Fan Account";
break;
case 'bands':
$members_query .= "&search_terms=Band Account";
break;
case 'venues':
$members_query .= "&search_terms=Venue Account";
break;
default:
return $members_query;
}
return $members_query;
}

//Add the above to your functions.php and then modify the bp loop within whatever area you want, for instance this is the modified version for the members loop:

<?php $members_query = lmc_members_query(bp_ajax_querystring('members'));?>

<?php if (bp_has_members($members_query)) :?>

0 Comments

You must be logged in to post a comment.