How to remove extra empty page

extra empty page shown the code for pagination given below

-1,
‘post_type’ => ‘product’,
‘posts_per_page’ =>16,
‘paged’ => $page,
‘order’ => ‘ASC’,
‘post_status’ => ‘publish’,
‘meta_query’ => array(
‘relation’ => ‘AND’,
$price_array[0]
),
‘tax_query’ => array(
array(
‘taxonomy’ => ‘product_cat’,
‘field’ => ‘id’,
‘terms’ => $term_id
)
)
);

$product_query = new WP_Query( $args );
$wp_query =$product_query;
$product_count=$product_query->found_posts;

?>

Read more here: How to remove extra empty page

Leave a Reply

Your email address will not be published. Required fields are marked *