Pagination linking to first page
Perhaps you can take a look at this question and the answers and check if you really want to use query_posts() as it is not recommended while dealing with posts pagination. Why not use pre_get_posts action instead? Or you can try something like this: <?php $custom_query = new WP_Query(array( ‘post_status’ => ‘publish’, ‘post_type’ => ‘products’, … Read more