'category', 'field' => 'slug', 'terms' => $category ) ); $args = array( 'posts_per_page' => '8', 'order' => 'DESC', 'orderby' => 'post_date', 'paged' => $page, 'tax_query' => $terms ); $all = array( 'posts_per_page' => '8', 'order' => 'DESC', 'orderby' => 'post_date', 'paged' => $page ); if ( $category != 'all' ){ $tabPosts = new WP_Query( $args ); ob_start(); if ($tabPosts->have_posts()){ while($tabPosts->have_posts()){ $tabPosts->the_post(); get_template_part('magazine/includes/post-grid-layout'); } $response['html'] = ob_get_clean(); wp_reset_postdata(); } wp_send_json( $response ); } else { $tabPosts = new WP_Query( $all ); ob_start(); if ($tabPosts->have_posts()){ while($tabPosts->have_posts()){ $tabPosts->the_post(); get_template_part('magazine/includes/post-grid-layout-all'); } $response['html'] = ob_get_clean(); wp_reset_postdata(); } wp_send_json( $response ); exit; } } Live Music Venues – SEE ROCK LIVE MAGAZINE