Querying Term Posts in Loop
To expand on the answer from @s_ha_dum – you need to modify a few things about your query. First, use his suggested tax query: $args = array( ‘post_type’ => ‘custcpt’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘custtax’, ‘field’ => ‘id’, ‘terms’ => $cat->term_id, ) ), ‘order’ => ‘ASC’ ); Then, modify your code as follows: … Read more