Title: next_posts_link() does not work correctly
Last modified: May 9, 2021

---

# next_posts_link() does not work correctly

 *  [galtsevt](https://wordpress.org/support/users/galtsevt/)
 * (@galtsevt)
 * [5 years ago](https://wordpress.org/support/topic/next_posts_link-does-not-work-correctly/)
 * next_posts_link () started displaying pagination after 11 blog posts. But I changed
   the home page and chose one category. the next_posts_link () function still thinks
   that I have 11 posts on the page, although there are 2 from the same category.
   Sorry for my English, I use a translator.
 *     ```
       <?php
       $blog_args = array(
                                       'post_type' => 'post',
                                       'cat' => 48, //chose one category
                                       'posts_per_page' => 10,
                                       'order' => 'DATE',
                                       'orderby' => 'DESC',
                                       'tax_query' => $tax_query,
                                       'paged' => $paged
                                       );
       $blog_query = new WP_Query($blog_args);
       ?>
       ```
   
    -  This topic was modified 5 years ago by [galtsevt](https://wordpress.org/support/users/galtsevt/).

Viewing 1 replies (of 1 total)

 *  [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [5 years ago](https://wordpress.org/support/topic/next_posts_link-does-not-work-correctly/#post-14417262)
 * The functions that compute pagination links use the main query for the page. 
   Your query is separate from the main query.

Viewing 1 replies (of 1 total)

The topic ‘next_posts_link() does not work correctly’ is closed to new replies.

## Tags

 * [next_posts_link](https://wordpress.org/support/topic-tag/next_posts_link/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Joy](https://wordpress.org/support/users/joyously/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/next_posts_link-does-not-work-correctly/#post-14417262)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
