WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Pagination 404 error on archive,php with query_posts() (3 posts)

  1. krizalis
    Member
    Posted 3 years ago #

    Hi guys,

    The problem I'm having: My Pagination Link is displaying correctly.. But when I click on "next" and the link is supposed to bring me to the 2nd page of the pagination on my archive.php template but instead, I got a 404 Page not found error.

    Here's my custom archive.php template (removed some not important parts of the codes)

    <?php
    global $query_string;
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts($query_string . '&posts_per_page=4&order=ASC&paged='.$paged); ?>
    <?php if (have_posts()) : wp_pagenavi(); while (have_posts()) : the_post(); ?>
    	//post content related stuff
    <?php endwhile; endif; ?>

    Note:

    • I'm using WP-PageNavi Plugin Version 2.61 to generate my pagination links (and yes they are displaying the correct linking.
    • I'm not using custom permalinks. I'm using the default permalink (aka ugly permalink) and the page 2 of the pagination still isn't working (the URL looks like this > http://www.domain.com/?cat=3&paged=2)
  2. krizalis
    Member
    Posted 3 years ago #

    Anyone has any ideas on how to fix this issue I have? :)

  3. krizalis
    Member
    Posted 3 years ago #

    Can a moderator delete 2 of my "bumps" including this one and leave the original so that someone with knowledge on my issue can see the "no replies" and help me? thanks! :D

Topic Closed

This topic has been closed to new replies.

About this Topic