Forums

WP-Paginate
404 error (6 posts)

  1. surfsup74
    Member
    Posted 1 year ago #

    Wp-paginate displays the pagination if there are more than 5 post in the category, however if you click to go to second page you get a 404.

    This code was working previously and I've not changed anything in the category template file.

    Last week I had to do a fresh install of wordpress due to my host server going down (nice!) could i have missed something when i reinstalled wp?

    <?php query_posts('category_name=blue&posts_per_page=5&paged='.$paged); ?>
    <?php if(function_exists('wp_paginate')) {
    wp_paginate();
    } ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php the_excerpt(); ?>
    <?php endwhile; ?></div>

    dan

  2. surfsup74
    Member
    Posted 1 year ago #

    I have just copied the code posted previously into a 'page' template file and it works fine - except that the li items are not styled as they are when i view the pagination on a 'category' template file.

    In the category template file the pagination looks fine (laid out in a row with first box blue) however the actual pagination does not work. Does this give any more clues as to why it doesn't work (i get a 404) in 'category' template files?

  3. surfsup74
    Member
    Posted 1 year ago #

    Sorry to keep adding to this question but i keep noticing more stuff that may help someone give me a solution.

    When used in the 'page' template my breadcrumb on page2 is like this:

    Home > Page-name > Page2

    When I am on page2 using the code on a 'cataegory' template (where i get the 404) I get this in the breadcrumb:

    Home > Page2

  4. vusis
    Member
    Posted 1 year ago #

    I'm also getting 404 on the page links!!
    can anybody help! ?

  5. ZND
    Member
    Posted 5 months ago #

    I had the same issue. In my case, it turned out I had a custom type with the same slug as the page I was trying to paginate. As a result, it was getting confused and routing my-page/page/2 to the type listing rather than back to the page.

    Do you have a category or type with the same name as Page-name?

  6. ScroogeHDL
    Member
    Posted 5 months ago #

    I had the exact the same problem that ZND had. I simply added one character to the slug of the page and now everything works great. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic