Add class to first post queried
<?php $_terms = get_terms( array(‘claim-accordion-type’) ); $i = 0; foreach ($_terms as $term) : $term_slug = $term->slug; $_posts = new WP_Query( array( ‘post_type’ => ‘claims_accordion’, ‘posts_per_page’ => -1, ‘tax_query’ => array( array( ‘taxonomy’ => ‘claim-accordion-type’, ‘field’ => ‘slug’, ‘terms’ => $term_slug, ), ), )); if( $_posts->have_posts() ) : $i++; if ( $i == 1 ) … Read more