Reply To: Random Results

#6116

Ernest Marcinko
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:

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 :)