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
Keymaster
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:
[code]if (count($all_pageposts) > 0) {[/code]
and replace it with this negative statement:
[code]if (0) {[/code]
So it becomes inactive. Then the go to line 384:
[code]ORDER BY priority DESC, relevance DESC, " . $wpdb->posts . "." . $orderby . "[/code]
and change that to:
[code]ORDER BY RAND()[/code]
If I’m correct, this should work 🙂