With this query I can call one post of each APP_TAX_STORE
$terms = get_terms(array('taxonomy' => APP_TAX_STORE));
foreach ($terms as $term){
$args = array(
'post_type' => APP_POST_TYPE,
'posts_per_page' => '1',
'order_by' => 'date',
'order' => 'ASC',
'tax_query' => array(
array(
'taxonomy' => APP_TAX_STORE,
'field' => 'slug',
'terms' => $term->slug,
)
)
);
$new_query = new WP_Query ($args);
if ($new_query->have_posts()) {
while($new_query->have_posts()){
$new_query->the_post();
get_template_part( 'loop', 'coupon' );
}
}
}
Now I need to combine these!
Really appreciate some help!