Random order of WP_Query results with highest meta value
OK, so you’re almost there. Let’s say you have this query: $argsLoop = array( ‘post_type’ => ‘cars’, ‘posts_per_page’ => 12, ‘paged’ => 1, ‘meta_key’ => ‘cars_price’, ‘orderby’ => ‘cars_price’, ‘order’ => ‘DESC’ ); $cars = new WP_Query( $argsLoop ); // All you have to add is this line: shuffle( $cars->posts ); Now you can do … Read more