[Resolved] Sort custom post type by rating score
hi i did this code and works fine but i cant get all “juegos posts” just posts with rating , how can i get rating and no rating list posts.
$paged = get_query_var('paged') ? get_query_var('paged') : 1; $args = array( 'post_type' => 'juegos', 'post_parent' => 0, 'meta_key' => 'ratings_average', 'orderby'=>'meta_value_num', 'order'=>'DESC', 'paged'=> $paged, 'posts_per_page' => 5 ); $the_query = new WP_Query( $args );
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been damaged by the forum’s parser.]
- The topic ‘[Resolved] Sort custom post type by rating score’ is closed to new replies.