Custom Woocommerce Product Query

Try this $args = array( ‘posts_per_page’ => -1, ‘post_type’ => ‘product’, ‘meta_key’ => ‘var_confirmed_date’, ‘meta_type’ => ‘DATE’, ‘orderby’ => ‘meta_value_date’, ‘order’ => ‘ASC’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘destination’, ‘field’ => ‘id’, ‘terms’ => array($t_id) ) ), ‘meta_query’ => array( array( ‘key’ => ‘var_confirmed_date’, ‘value’ => date(“Y-m-d”,time()), ‘compare’ => ‘>=’, ‘type’ => ‘DATE’, ), … Read more

Custom post type query with taxonomy

Answering your second question – yes, it is possible, you can use tax_query for this, for example, this query will get all posts that has any term of ‘flowers’ taxonomy AND ‘colors’ taxonomy: $query = new WP_Query( array( ‘post_type’ => ‘custom-post’, ‘posts_per_page’ => 5, ‘order’ => ‘DESC’, ‘tax_query’ => array( ‘relation’ => ‘AND’, // it … Read more