This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Randomize matched results?

#20613
tavy87tavy87
Participant

I decided to randomize my results in the following way, I think it works, and I hope it can help others!

add_filter('asp_user_results', 'randomize_results', 10, 2);
function randomize_results($user_results, $search_id) {
	if ($search_id == 1) {
		shuffle($user_results);
	}
	return $user_results;
}