Title: posts_nav_link  bug?
Last modified: August 18, 2016

---

# posts_nav_link bug?

 *  Resolved [richarduk](https://wordpress.org/support/users/richarduk/)
 * (@richarduk)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/posts_nav_link-bug/)
 * I hesitate to say that this IS a bug …
 * Using posts_nav_link in WP 2.1.1 (for paged posts) on my index page works fine
   with default permalinks, but with a custom permalink doesnt.
 * With the custom permalink `/index.php/%post_id%` I start off from
    [http://localhost/projects/Wordpress-test1/](http://localhost/projects/Wordpress-test1/)
 * and using Next Page go to (error page) [http://localhost/projects/Wordpress-test1/index.php/page/2/](http://localhost/projects/Wordpress-test1/index.php/page/2/)
 * With default permalinks I go succesfully from
    [http://localhost/projects/Wordpress-test1/](http://localhost/projects/Wordpress-test1/)
 * to
    [http://localhost/projects/Wordpress-test1/index.php?paged=2](http://localhost/projects/Wordpress-test1/index.php?paged=2)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/posts_nav_link-bug/#post-528956)
 * Perhaps some light reading?
    [http://codex.wordpress.org/Template_Tags/posts_nav_link](http://codex.wordpress.org/Template_Tags/posts_nav_link)
 *  Thread Starter [richarduk](https://wordpress.org/support/users/richarduk/)
 * (@richarduk)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/posts_nav_link-bug/#post-528965)
 * Okay …
 * I went over that page many times before I posted – which bit of that page should
   I be reading?
 *  Thread Starter [richarduk](https://wordpress.org/support/users/richarduk/)
 * (@richarduk)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/posts_nav_link-bug/#post-529009)
 * Ok, resolved it.
 * I needed to put a query_string in the query_posts `<?php query_posts($query_string.'
   order=DESC&showposts=2') ?>` which was in front of The Loop. For anyone reading,
   it’s on this page and preserves information that would otherwise be lost:
 * [http://codex.wordpress.org/Template_Tags/query_posts](http://codex.wordpress.org/Template_Tags/query_posts)
 *  [polyfade](https://wordpress.org/support/users/polyfade/)
 * (@polyfade)
 * [19 years ago](https://wordpress.org/support/topic/posts_nav_link-bug/#post-529158)
 * `<?php query_posts($query_string . 'order=DESC&showposts=2') ?>`
 * this doesn’t always work.
    for example, i have a total of 12 posts. my admin 
   number of posts to display is set for 3. if i specify: `<?php query_posts($query_string.'
   order=DESC&showposts=2') ?>` i’ll get an error for /page/5
 * `?query_string` basically knows ahead of time how many pages it needs to produce
   based on your admin default. if it goes beyond that amount, you’ll receive an
   error.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘posts_nav_link bug?’ is closed to new replies.

## Tags

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

 * In: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
 * 4 replies
 * 3 participants
 * Last reply from: [polyfade](https://wordpress.org/support/users/polyfade/)
 * Last activity: [19 years ago](https://wordpress.org/support/topic/posts_nav_link-bug/#post-529158)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
