'post', 'posts_per_page' => absint( $service_number ), 'post_status' => 'publish', 'paged' => 1, ); if ( absint( $service_category ) > 0 ) { $service_args['cat'] = absint( $service_category ); } // Fetch posts. $the_query = new WP_Query( $service_args ); if ( $the_query->have_posts() ) : $count= 0;?>
have_posts() ) : $the_query->the_post(); $count++; ?>