Title: Archive Pagination Issues
Last modified: September 11, 2019

---

# Archive Pagination Issues

 *  [joshuagamble](https://wordpress.org/support/users/joshuagamble/)
 * (@joshuagamble)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/archive-pagination-issues/)
 * Hello and thanks for a wonderful plugin. I have encountered an issue with the
   post grid on category archive pages. For the most part it displays correctly,
   however once you get past the first few pages of the grid, it links to a 404 
   error.
 * Click on any of the category links in my main bar (all of them are post categories),
   and try and use the pagination.
 * I’ve noticed that for categories with lots of posts and grid pages, the 404 doesn’t
   appear until page 5 or six. However on categories that have less than 20 or so
   posts, the 404 occurs on page 2.
 * Any help on this is appreciated!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Farchive-pagination-issues%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [PickPlugins](https://wordpress.org/support/users/pickplugins/)
 * (@pickplugins)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/archive-pagination-issues/#post-11924002)
 * Thanks for your post. i guess this is conflicting with 3rd party plugins. i suggest
   you try these steps.
 * #1. Go to permalink settings and save once again to reset permalinks.
    #2. Deactivate
   others plugin one by one to check if any 3rd party plugin conflicts. #3. Try 
   with default themes to check if your theme causes the issue.
 * Make sure you didn’t use “post_grid_filter_query_args” filter hook anywhere, 
   and if you used please let me know how you used it.
 * Please let me your result.
 *  Thread Starter [joshuagamble](https://wordpress.org/support/users/joshuagamble/)
 * (@joshuagamble)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/archive-pagination-issues/#post-11938410)
 * Thanks for the response!
 * Unfortunately, resetting permalinks did not help. I also deactivated all other
   plugins and tried on theme 2019 with no luck. I am thinking it might be my php
   that is incorrect.
 * This is what I have in my archive.php of my child theme. Any help is appreciated!
 *     ```
       <?php
   
       get_header(); ?>
   
        <div id="primary" class="index-content-area">
        <main id="main" class="site-main" role="main">
        <?php if ( have_posts() ) : ?>
   
        <?php if ( is_home() && ! is_front_page() ) : ?>
        <header>
        <h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
        </header>
        <?php endif; ?>
   
   
        <div class="index-grid">
        <h1 class="archive-title">
        <?php
        the_archive_title()
        ?>
       </h1>
        <?php
        // Start the loop.
        $my_post_array = array();
        while ( have_posts() ) : the_post();
   
        /*
        * populate array with all queried post IDs
        */
        $my_post_array[] = $post->ID;
   
        // End the loop.
        endwhile;
   
   
       echo do_shortcode("[post_grid id='13950']");
   
   
        // If no content, include the "No posts found" template.
        else :
        get_template_part( 'content', 'none' );
   
        endif;
        ?></div>
        <div class="archive-back" onclick="location.href='/blog'" ><button class="archive-return"> ← All Blog Posts</button></div>
        </main><!-- .site-main -->
        </div><!-- .content-area -->
   
       <?php get_footer(); ?>
       ```
   
 *  Plugin Author [PickPlugins](https://wordpress.org/support/users/pickplugins/)
 * (@pickplugins)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/archive-pagination-issues/#post-11941785)
 * have you tried by removing default while loop? post grid shortcode should replace
   the default while loop,
 * check the code
 *     ```
       <?php
   
       get_header(); ?>
   
        <div id="primary" class="index-content-area">
        <main id="main" class="site-main" role="main">
        <?php if ( have_posts() ) : ?>
   
        <?php if ( is_home() && ! is_front_page() ) : ?>
        <header>
        <h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
        </header>
        <?php endif; ?>
   
   
        <div class="index-grid">
        <h1 class="archive-title">
        <?php
        the_archive_title()
        ?>
       </h1>
        <?php
        // Start the loop.
       // Replaced while loop by post grid
       echo do_shortcode("[post_grid id='13950']");
   
   
        // If no content, include the "No posts found" template.
        else :
        get_template_part( 'content', 'none' );
   
        endif;
        ?></div>
        <div class="archive-back" onclick="location.href='/blog'" ><button class="archive-return"> ← All Blog Posts</button></div>
        </main><!-- .site-main -->
        </div><!-- .content-area -->
   
       <?php get_footer(); ?>
       ```
   
    -  This reply was modified 6 years, 7 months ago by [PickPlugins](https://wordpress.org/support/users/pickplugins/).
 *  Thread Starter [joshuagamble](https://wordpress.org/support/users/joshuagamble/)
 * (@joshuagamble)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/archive-pagination-issues/#post-11941947)
 * Thanks for that suggestion. I replaced the code in my archive.php
 * It looks like the issue is still persisting.
 * Look at example page [http://cloistered.wpengine.com/category/homeschool/](http://cloistered.wpengine.com/category/homeschool/)
 * Page 1 works, page 2 also works, but page 3 gets a 404 error.
 * Thanks!
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [6 years, 6 months ago](https://wordpress.org/support/topic/archive-pagination-issues/#post-12084828)
 * [@pickplugins](https://wordpress.org/support/users/pickplugins/) I’m a month 
   late but I’ve deleted your offer to login to your user’s site. I’m am 100% sure
   you mean well but please _never ask for credentials._ I have flagged your account
   temporarily. That just means that your post will need to be approved and @ notifications
   from you will not work.
 * [https://wordpress.org/support/guidelines/#the-bad-stuff](https://wordpress.org/support/guidelines/#the-bad-stuff)
 * Now for the why: The internet is a wonderful place full of very nice people and
   a few very bad ones. I’m sure everyone here is very nice however, by giving some
   ones keys to your house you are trusting they wont steal anything. Likewise the
   person who takes the keys is now responsible for the house FOREVER.
 * If something was to go wrong, then you the author may well legally become liable
   for damages, which they would not normally have been as their software is provided
   without warranty.
 * **Please be aware that repeatedly asking for credentials will result in us asking
   you to repeatedly stop before escalating up to the plugins team.**
 *  Plugin Author [PickPlugins](https://wordpress.org/support/users/pickplugins/)
 * (@pickplugins)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/archive-pagination-issues/#post-12084890)
 * Hi [@jdembowski](https://wordpress.org/support/users/jdembowski/) this is really
   unexpected mistake, and understand the forum rule, sometimes we screwed-up and
   eager to solve user issues. i hope we will more careful about this issue.
 * Regards
    -  This reply was modified 6 years, 6 months ago by [PickPlugins](https://wordpress.org/support/users/pickplugins/).
    -  This reply was modified 6 years, 6 months ago by [PickPlugins](https://wordpress.org/support/users/pickplugins/).
 *  Thread Starter [joshuagamble](https://wordpress.org/support/users/joshuagamble/)
 * (@joshuagamble)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/archive-pagination-issues/#post-12085201)
 * Thanks for that info Jan. I wasn’t aware and I’ll be more careful going forward.
   🙂
 * Thanks again [@pickplugins](https://wordpress.org/support/users/pickplugins/)
   for your tireless help!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Archive Pagination Issues’ is closed to new replies.

 * ![](https://ps.w.org/post-grid/assets/icon-256x256.gif?rev=3295086)
 * [Post Grid](https://wordpress.org/plugins/post-grid/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-grid/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-grid/)
 * [Active Topics](https://wordpress.org/support/plugin/post-grid/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-grid/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-grid/reviews/)

## Tags

 * [archives](https://wordpress.org/support/topic-tag/archives/)
 * [categories](https://wordpress.org/support/topic-tag/categories/)
 * [pagination](https://wordpress.org/support/topic-tag/pagination/)

 * 7 replies
 * 3 participants
 * Last reply from: [joshuagamble](https://wordpress.org/support/users/joshuagamble/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/archive-pagination-issues/#post-12085201)
 * Status: not resolved