Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Random Results › Reply To: Random Results
October 5, 2015 at 9:08 am
#6116
Oh, you are using a different version than what I’m looking at and I forgot about the secondary ordering as well.
For the correct solution, first find line 602:
if (count($all_pageposts) > 0) {
and replace it with this negative statement:
if (0) {
So it becomes inactive. Then the go to line 384:
ORDER BY priority DESC, relevance DESC, " . $wpdb->posts . "." . $orderby . "
and change that to:
ORDER BY RAND()
If I’m correct, this should work 🙂
Best,Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)



