contest-archistart
// WP_Query arguments $args = array ( 'post_type' => array( 'contest' ), 'post_status' => array( 'published' ), 'order' => 'DESC', 'orderby' => 'id', 'meta_query' => array( array( 'key' => 'in_corso', 'value' => '1', 'compare' => '=', ), ), ); // The Query $terms = new WP_Query( $args ); // The Loop if ( $terms->have_posts() ) { while ( $terms->have_posts() ) { $terms->the_post(); // do something } } else { // no posts found } // Restore original Post Data wp_reset_postdata();