'post', 'posts_per_page' => absint($no_of_frontlines), 'post_status' => 'publish', 'no_found_rows' => 1, 'ignore_sticky_posts' => 1, 'orderby' => esc_attr($frontline_orderby), 'order' => esc_attr($frontline_order), ); // Check for category. if (!empty($frontline_cat)) { $post_args['tax_query'] = array( array( 'taxonomy' => 'category', 'field' => 'term_id', 'terms' => $frontline_cat, ), ); } $count = 1; $frontlines = new WP_Query($post_args); if ($frontlines->have_posts()) : ?>
have_posts()) : $frontlines->the_post(); ?>