'post', 'posts_per_page' => $blogarc_number_of_posts, 'post_status' => 'publish', 'no_found_rows' => true, // Improves query performance. 'ignore_sticky_posts' => true, ]; if (!empty($blogarc_select_category)) { $post_args['tax_query'] = [ [ 'taxonomy' => 'category', 'field' => 'term_id', 'terms' => $blogarc_select_category, ], ]; } $search_latest_posts = new WP_Query($post_args); if ($search_latest_posts->have_posts()) : $blogarc_custom_title = get_theme_mod('blogarc_custom_title'); ?>

have_posts()) : $search_latest_posts->the_post(); ?>