Forums

[resolved] [Plugin: WP-PageNavi] 404 errors on all paged events (9 posts)

  1. blackc2004
    Member
    Posted 1 year ago #

    Hi, I am using Wp-Pagenavi on a site with the following permalink structure: /%category%/%postname%

    Whenever someone tries to use the page navigation, it give a 404 error. Has anyone else seen this or know how to fix it?

    Thanks.

    http://wordpress.org/extend/plugins/wp-pagenavi/

  2. GamerZ
    Member
    Posted 1 year ago #

    Does the default WP pagination like prev/next works?

  3. blackc2004
    Member
    Posted 1 year ago #

    I just tried those and they do not work either...

    Any ideas why those would not work?

    Thanks.

  4. GamerZ
    Member
    Posted 1 year ago #

    What about the Date/Time Permalink structure?

  5. blackc2004
    Member
    Posted 1 year ago #

    Ok. I've been playing around with this some more and here's what I've found.

    If you go to /category/news the pagination works fine. But the category/blog is a combination of three different categories. So in my archive.php I have:

    if (is_category('Blog')) {	query_posts('cat=1,3,4'); }
    while(have_posts()) : the_post(); ?>

    Is there a better way I should be doing this?

  6. GamerZ
    Member
    Posted 1 year ago #

    Because that query_posts() did not take into consideration the "paged" element and hence it always thought it is page 1.

  7. blackc2004
    Member
    Posted 1 year ago #

    So what would be the way to resolve this? How do you get the pages from the URL?

  8. GamerZ
    Member
    Posted 1 year ago #

    Try query_posts('cat=1,3,4&paged='.intval(get_query_var('paged')));

  9. blackc2004
    Member
    Posted 1 year ago #

    Thanks. That doesn't seem to work because WP is throwing a 404 before it gets to my updated query_posts... I know I could do a plugin to dix this, but I think that I'll just remove this code for now.

    Thanks for all the help!

Topic Closed

This topic has been closed to new replies.

About this Topic