• 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 to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author PickPlugins

    (@pickplugins)

    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

    (@joshuagamble)

    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

    (@pickplugins)

    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.
    Thread Starter joshuagamble

    (@joshuagamble)

    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/

    Page 1 works, page 2 also works, but page 3 gets a 404 error.

    Thanks!

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @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

    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

    (@pickplugins)

    Hi @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.
    • This reply was modified 6 years, 6 months ago by PickPlugins.
    Thread Starter joshuagamble

    (@joshuagamble)

    Thanks for that info Jan. I wasn’t aware and I’ll be more careful going forward. πŸ™‚

    Thanks again @pickplugins for your tireless help!

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

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