'Previous entries' gives 404 (47 posts)

  1. poptaste
    Posted 8 years ago #

    the solutions is here:

  2. creativeworldstudio
    Posted 8 years ago #


    This dosen't solve the issue... (for me at least!) The link you posted is for a different issue not related to the one being discussed in this thread...

  3. Anonymous
    Posted 8 years ago #


    I looked at your page and I think I have a solution.

    There is a conflict of names that drives WordPress crazy:

    1. the base category name you have chosen is: "blog"

    2. the static page name with a blogging template is also: "blog"

    The solution is just to change the static page's name.
    1. Go to Dashboard/ Manage/ Page
    2. Choose to edit the page "Blog"
    3. Change the name of this page to "My Blog" (for example)
    4. Edit the permalink below to: http://www.creativeworld.com.au/my-blog/ (for example)

    Hope it helps.

  4. creativeworldstudio
    Posted 8 years ago #

    Thanks for taking a look gregory.poland!

    I actually found the same solution by testing a lot of different configurations... basically I found that if the static page for your blog posts is called "ABC" and the permalinks structure has the same base ie- "ABC/date/category/post-name", WordPress goes crazy with conflicting names... (well, only in the pagination department!)

    My configuration:

    mydomain.com/blog/ < Static page for blog post
    mydomain.com/blog/category/post-title < Permalink structure for blog posts

    What you've suggested is:

    mydomain.com/my-blog/ < Static page for blog post
    mydomain.com/blog/category/post-title < Permalink structure for blog posts

    Unfortunately for me, renaming the static page or permalink base is just not an option - It dosen't make sense from website structure point of view.. any other ideas?

    I do have an idea on a fix - I think the variable needs to be used in the same place - as mentioned, WordPress will see the static page for posts "ABC" and permalink base "ABC" as two different objects... but perhaps they need to be the same?? - ie:


    I have no idea how to solve the problem but really hope someone can share the solution soon!!

  5. dhardy
    Posted 8 years ago #


    Thank you for documenting this. I agree with you that changing the structure isn't an ideal solution.

    My biggest concern is if your site has been up for a while you will be destroying any page ranking you may have. Basically search engines will see these as new pages (at least from my experience). This has been a known problem since 2.5.0 and I am bummed to see that it doesn't appear to be on the 2.6.1 release. That means that it will be several more months before it gets corrected.

    In 2.5 there was a hack around it but I haven't seen anything for the last two versions. I tried raising the status of the bug but it just got reset.

    As a PHP hobbiest I tried to determine the solution myself but unfortunately the rewrite section is above my skill level.

    If anyone can shed some light and expidite a solution please let me know how.


  6. Anonymous
    Posted 7 years ago #

    I was having the same problem, am using 2.6, and just fixed it using Ryan's recommended method from here.

    So far I have not seen any negative side-effects.

  7. Teufel
    Posted 7 years ago #

    After spending the past 6 weeks searching the web for a fix to this problem I finally found one that actually works!


    The code he created was to fix an issue with WP 2.2.1, but works perfectly in 2.6! Hopefully this will be helpful for the rest of you guys.

  8. revlimiter
    Posted 7 years ago #

    This is very confusing...
    Much like jk079, I am also running a custom frontpage.
    (WP 2.6) When I go into Settings > Permalinks > Custom Structure and type in "http://www.kimstewart.ca/blog/%postname%/" it fixes the pagination issue on my blog.

    However, when I click a post, it also adds the extra "http://www.kimstewart.ca/" ... lol

    I also noticed that WordPress adds an extra "/" in front of anything you type into the Custom Structure box. ... This may be the problem?

    Any ideas how to fix?

  9. creativeworldstudio
    Posted 7 years ago #

    WOW.. I don't know how to say this, but I gave the original fix by Ryan another go after markmathson said it solved his issue.. and what do you know - it worked!

    I'm a bit lost for words.. I had tried it a number of times, step by step, honestly.. and nothing happened! but today the sun is shinning and it appears to be working very nicely!

    Here's the proof: My blog's page 2 at Creative World :)

    Just want to say big thank you to all who helped out in looking/finding/solving the problem and solution. It was much appreciated.

  10. revlimiter
    Posted 7 years ago #

    You're right! It's working, creativeworldstudio! Thanks for the tip. Maybe it was the latest WordPress 2.6.1 upgrade that allowed this fix to work, or maybe I forgot to hit Save Changes after I made changes to rewrite.php, but it is indeed finally working!

    For all of those that don't know what to do, just do *exactly* this:

    in "/wp-includes/rewrite.php"
    replace "$this->use_verbose_page_rules = false;"
    with "$this->use_verbose_page_rules = true;"

    Then go into WordPress CMS, click Settings->Permalinks page and click "Save Changes".

    Done! :)

  11. DeanK
    Posted 7 years ago #

    Thankfully this fixed resolved the issue for me too, without having to change the structure of my permalinks or the name of my static post page.

    And finally I understand why it is happening, with my static post page ("blog") matching the opening subfolder of my permalink structure (/blog/%postname%/).

    At least they now co-exist without having to change either setting, until the issue is fully resolved without manual editing of rewrite.php!

    Thanks to all above in this thread for sorting it out, posting solutions and making it easier for me. I've had this issue in the past and never got it resolved until now.

  12. revlimiter
    Posted 7 years ago #

    OK, I am getting a 404 again when I click previous entries... Anybody else having the same issue all of a sudden?

  13. s.lepler
    Posted 7 years ago #

    Hey i found I was having this issue (where the "previous entries" link on the front page would return a 404) and I tried everything people said on here to no avail.

    As I re-read the comments I noticed that someone mentioned the permalinks rewrite plug-in and a light bulb went off over my head. All i had to do was add:
    into the first box in this plug-in (the one titled "Paths to be skipped Separate each entry with a new line. Matched with regular expression.") and save it.

    Now my site is working correctly

  14. sparkybarkalot
    Posted 7 years ago #


    Just wanted to say that jrm213 had the only solution that worked for me (see above). Nice work and thanks!

  15. creativeworldstudio
    Posted 7 years ago #

    Arhhh.. I upgraded my blog 2 weeks ago and thought this bug had been fixed. Silly me for assuming as today I notice that my pagination hasn't been working.

    I'm disappointed to see this major bug didn't get addressed in 2.6 and 2.7 (after it was discovered in 2.3 / 2.5 !) - Fingers crossed it can be sorted in 2.8.

    (btw- the original fix still solves the issue)

  16. Eric Martin
    Posted 7 years ago #

    I ran into this issue as well. I attempted to "fix" it:

    Anyone willing to test it out?

  17. sokai
    Posted 7 years ago #


    You are my hero! :)
    Your patch did the trick for me and my permalink problem on WP2.7.

    Look at http://sokai.name/blog/ and use the links "Ältere Beiträge" und "Neuere Beiträge".
    That page (slug: "blog") is a static page for my posts.
    As custom permalinks I use "/blog/%postname%/".

    Thanks again... Now my next wish is changing the default pagination text "page"... ;)


    *damn* ...now I can't see any post I wrote... (Just click on a post title and you will get a 404.)

    Someone can make another suggestion!? *hopeso*
    I'm willing to make some tests! :)

Topic Closed

This topic has been closed to new replies.

About this Topic