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

Reply To: Random Results

#6116
Ernest MarcinkoErnest 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:

[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 🙂