'post', 'posts_per_page' => 5, 'post_status' => 'publish', 'no_found_rows' => 1, 'ignore_sticky_posts' => 1, ); // Check for category. if (!empty($cat_highlight_post_category)) : $cat_highlight_args_1['tax_query'] = array( array( 'taxonomy' => 'category', 'field' => 'term_id', 'terms' => $cat_highlight_post_category, ), ); endif; $cat_highlight_post_1 = new WP_Query($cat_highlight_args_1); if ($cat_highlight_post_1->have_posts()) : ?>
have_posts() && $post_count < 2) : $cat_highlight_post_1->the_post(); $post_count++; ?>
have_posts() && $post_count < 5) : $cat_highlight_post_1->the_post(); $post_count++; ?>

'post', 'posts_per_page' => 6, 'post_status' => 'publish', 'no_found_rows' => 1, 'ignore_sticky_posts' => 1, ); $counter=1; // Check for category. if (!empty($spotlight_post_category_2)) : $spotlight_args_2['tax_query'] = array( array( 'taxonomy' => 'category', 'field' => 'term_id', 'terms' => $spotlight_post_category_2, ), ); endif; $spotlight_post_2 = new WP_Query($spotlight_args_2); if ($spotlight_post_2->have_posts()) : while ($spotlight_post_2->have_posts()) : $spotlight_post_2->the_post(); ?>