• 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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter surfsup74

    (@surfsup74)

    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?

    Thread Starter surfsup74

    (@surfsup74)

    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

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

    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?

    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!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: WP-Paginate] 404 error’ is closed to new replies.