Post query by Tax query
// WP_Query arguments $args = array( 'post_type' => array( 'product' ), ); // The Query $post_query = new WP_Query( $args ); // The Loop if ( $post_query->have_posts() ) { while ( $post_query->have_posts() ) { $post_query->the_post(); // do something } } else { // no posts found } // Restore original Post Data wp_reset_postdata();