Support » Fixing WordPress » ‘Previous entries’ gives 404

Viewing 15 replies - 16 through 30 (of 46 total)
  • Hi,

    while benjette don’t post the magic recipe, I kinda solve this problem.

    Please check http://wordpress.org/support/topic/167305.

    HTH

    Hi, just wanted to post that we were having this issue and solved it a little differently. I don’t know why one thing works for some and not for others but here was our situation.

    our permalink structure is /%category%/%postname%

    http://www.oursite.com/news listed all of our news category posts and at the bottom had a link for previous posts that would always give a 404 if you clicked it. That link looked like http://www.oursite.com/news/page/2

    Change our navigation to access the news page to be http://www.oursite.com/category/news resolved the issue. It made the link at the bottom of the page be http://www.oursite.com/category/news/page/2 and from that point on all the previous and next links worked just fine.

    hope this helps the next person that comes along!

    I have tried all of the above and neither one has worked for me. I am having exactly the same problem as described for several people here…

    permalink structure: /%category%/%postname%

    In this case…

    http://www.mypage.com/news

    This calls the archive.php

    archive.php has an include: if (in_category(“news”)) INSERT news_arquive.php

    In news_archive.php I have the following code:

    <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1;?>
    						<?php query_posts("cat=7&showposts=5&paged=$page");?>

    And then in the bottom I have the previous and next links. They point to:

    http://www.mypage.com/news/page/2

    But that doesn’t seem to exist so I get a 404 page.

    Question is.. WHY?

    everything i described above works just fine on index.php (home page)…

    why doesn’t it work on the news category?

    The index.php is almost identical to the news category page except that it has other images before the posts.

    and it also works if I add an category base to the permalink structure… but I really dont want a category base…

    I changed my Permalink structure from “default” to “date and name based” and started getting 404 errors when clicking on Previous Entries. Changing it back to “default” fixed the problem. I’m on WordPress version 2.3.3.

    I’m having the same issue in 2.5.1

    Permalink structure /%category%/%postname%/

    /page/2/ leads to a 404 error *unless* the front page and the second page show the same number of posts (3, in this case.) That, need I say, is annoying as heck. I’d *much* rather show 3 on the front page and 10 on the rest of the pages.

    Pagination worked fine under the default permalink structure. I’ve completely rebuilt htaccess and mucked about with all the other suggestions I could find, with no luck.

    My major question is the same as gimperdaniel’s: WHY is it doing this? My minor question is how do I make it stop?

    EDIT:
    Could this have something to do with a mismatch between “showposts=3” in the index.php template and a “Pages show at most 10” setting? Removing the “showposts” setting from the index.php file also seems to fix it.

    EDIT (again):
    Adding a conditional ( is_front_page() && !is_paged() ) to the query string, with the front page using “showposts=3” and everything else omitting the restriction, doesn’t seem to solve the problem either.

    And mine has stopped working again! Fun.

    My site: http://joykim.net

    I have a custom front page, and my blog at:
    http://joykim.net/blog

    Therefore, the second page should be at:
    http://joykim.net/blog/page/2

    That returns a 404.

    What works instead–the url where page 2 would be if I did not have a custom front page:
    http://joykim.net/page/2/

    The category pages paginate correctly. For example:
    http://joykim.net/posts/category/manga/page/2/

    Anyway, this makes me think this is all linked to my having a custom front page–any ideas?

    Did you guys figure anything out on this? I’m kind of in the opposite situation than you where I want 10 posts-per-page on the home page, and only 3 posts-per-page on a category page.

    I’ve created a template category file, “category-4.php” in my theme and followed the guide here:
    http://www.nathanrice.net/blog/creating-a-blog-page-with-paging/

    When I go to mysite.com/category/mycategory/page/2/ it displays the second page of posts but the number is off. No matter what I do, this custom category template is loading the first 10 posts of the category and paging the next 10 posts (even though only 3 are shown).

    Any ideas?

    I’m having major issues as well and would appreciate any help/idea’s you might have. (Running WP2.5.1)

    custom front page:
    http://www.creativeworld.com.au
    blog located:
    http://www.creativeworld.com.au/blog

    Permalink structure: (custom)
    /blog/%category%/%postname%/

    Category base: (method to use /blog/%category%/ as instead of /blog/category/%category%/)
    /blog/.

    .htaccess file:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    findings so far:
    – changing permalink structure to default or changing to a different custom structure (ie- /posts/%category%/%postname%/) makes /page/2 previous entries work (but this is not a solution!)

    There seems to be a conflict between category base and permalink structure…??

    Please please please help!!

    Update:

    After more thinking of what could be the cause, I remembered that my blog is uses a static front page called (Home) and the static page to view posts is called “Blog”…

    Could it be that when a user clicks on previous entries, wordpress is looking for a static page at mydomain.com/blog/page/2 – which does not exist (hence the 404) ???

    If I change the name of the static page for posts, then everything works fine.. however I need to have my blog posts located at mydomain.com/blog/

    Any ideas on a solution/fix?

    Another Update:

    I found this issue being tracked (ticket #6603) – This bug looks to be a serious issue. (bad next_posts_link when using a Static Front Page and custom permalink structure.)

    I wish it had been addressed in 2.6 🙁
    Again, if anyone has a hot fix/solution I would love to hear from you.

    Cheers.

    i got a same problem…next page is always 404 if i change the permalink to a custom permalink…but it’s normal again when i changed it to default permalink…i’ve tried this on wp 2.6 and still got a same problem

    i got another WP blog hosted with the same hosting but it works fine even after i change to custom permalink. 🙁

    the solutions is here:
    http://wordpress.org/support/topic/167795?replies=1
    finally…

Viewing 15 replies - 16 through 30 (of 46 total)
  • The topic ‘‘Previous entries’ gives 404’ is closed to new replies.