'category') ); // Arguments $args = [ 'post_type' => 'post', 'posts_per_page' => absint($posts_limit), 'no_found_rows' => true, 'ignore_sticky_posts' => true ]; if ( $featured_cats && !empty( $terms ) && in_array( $featured_cats, wp_list_pluck( $terms, 'term_id' ) ) ) { $args['category__in'] = absint($featured_cats); } $the_query = new WP_Query( $args ); if ( $the_query->have_posts() ) : ?>