Type: Lots, Taxonomy: Catalog
Leon Gallery
// WP_Query arguments $args = array( 'post_type' => array( 'lots' ), 'tax_query' => array( array( 'taxonomy' => 'catalog', 'field' => 'term_id', ), ), ); // The Query $lot_query = new WP_Query( $args ); // The Loop if ( $lot_query->have_posts() ) { while ( $lot_query->have_posts() ) { $lot_query->the_post(); // do something } } else { // no posts found } // Restore original Post Data wp_reset_postdata();