Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Random Results › Reply To: Random Results
September 24, 2015 at 10:17 am
#6023
Hi!
Only with a minor modification to the code, there is not other way unfortunately.
If you open up the wp-content/plugins/ajax-search-pro/includes/search/search_content.class.php file and scroll down to line 607, where you should see this:
ORDER BY priority DESC, relevance DESC, " . $wpdb->posts . "." . $orderby . "
change that line to:
ORDER BY RAND()
That should do it.
Please not that this solution is not update-proof, so once you update, you need to do this again. Also, make sure to do tests with a few phrases, random ordering might be a resource-heavy operation in some cases.
Best,Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)