Hi! Still I have not resolved this problem. Orderby rand not working. There is my query:
$args = array(
'cat' => 2,
'posts_per_page' => 12,
'orderby' => 'rand'
);
$query = new WP_Query( $args );
I used print_r to check for changes, but result all time same. There is begining of my query print_r result:
WP_Query Object ( [query] => Array ( [cat] => 2 [posts_per_page] => 12 [orderby] => rand ) [query_vars] => Array ( [cat] => 2 [posts_per_page] => 12 [orderby] => meta_value [error] => [m] => [p] => 0
-
This reply was modified 7 years, 7 months ago by rondos.