Support » Fixing WordPress » Fix for the previous/next entry link problem…

  • Ok, for starters I’m using 2.5, but I noticed that a lot of people…including myself was having the notorious previous/next entry link problem, and I discovered a fix that works for me. I can only hope that it might work for some of you as well because I understand how frustrating it is to have something broken.

    On my index, my query is calling for a maximum of 5 posts which is great and all, but what I didn’t notice before, that I just realized is that in my control panel –> settings –> reading…I had ‘Blog pages show at most set to *10* posts. I changed this to 5 to match my query and everything works fine now. I can use previous/next entry links and I don’t even have to touch my permalink structure.

    If you’re using the showposts bit, make sure it matches your settings.

    I hope this works!

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

    WAOOOOO!! Yeah, it works!
    I was looking for solutions about that kind of problem for a long time, and I was re-making htaccess file again and again so many times…
    Thank you for finding the simple easy solution.
    It really helped me.
    Now I can go to sleep at last…

    THANK YOU SO MUCH. This issue was driving me bonkers, and this finally solved it.

    Thanks for the tip. My situation was a bit more complicated because I was using an equation in my loop query to call a different number of posts on the first page than on subsequent pages, so I wasn’t sure what to set the blog options “number of posts” to…

    I’m not sure why this works, but when I set the options to “0” everything works smoothly! Anyone know why this is?



    @davidgarlitz – How did you set it to zero? I have multiple posts on other pages and one post on the homepage. It won’t accept 0 and keeps changing it to 1. Setting it to 1 fixes the next/previous links but makes all pages only contain 1 post. Any ideas?



    HM… interesting. I concur – it doesn’t seem to accept ‘0’ as a value, and resets it to ‘1’. Which still seems to work.

    My situation is that pagination issue was breaking for me when:

    1. I was using a custom permalink structure
    2. I had the settings under ‘reading’ set to 10
    3. I was using a custom query to override that setting to a different value using the showposts variable

    In every case that I tested, if the “Blog pages show at most” value is set higher than whatever you’re specifying using showposts in your custom query, pagination breaks.

    On the other hand, setting showposts to a value higher than the “Blog pages show at most” value seems to work allright. I’m still testing it in a few situations, but so far it’s looking promising.

    Hope this is helpful!

    KimboF, you should be able to force your pages to display more than one post using a custom query_posts or wp_query before your loop. For example,


    Unfortunately, this is what caused my problem in the first place 😉 Might be fixed though… (DREAM SIZE, you’re my hero!).

    OK, I have had this problem since I upgraded to 2.6. I just installed 2.7 and the problem is still there. No matter what link I click on, it shows the front page. I assume this is the 404 error that everyone is referring to. I’ve read all of the posts. I went in and checked my rewrite.php file, but there is no verbose line to change to true. Line 1002 is completely different.

    I uploaded the fix-plugin from 2.2 and it did not make a change.

    Here is my permalink structure: /index.php/%year%/%category%/%postname%

    My blog is @

    I have the same issue on a raw working install of WP, no plugins except Akismet. My permalink structure is:


    Everything works. Even the individual posts’ pagination (previous_post_link) etc works.

    But the *category pagination* does not work. From page 2 onwards it gives me a 404, e.g., this page breaks:

    This shows the pagination at the bottom, but when you click on it, this URL croaks:

    Any ideas?

    Woo! After hours of searching, this is the only things that worked. Thanks!

    This worked for me:topic

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Fix for the previous/next entry link problem…’ is closed to new replies.