Definitely not, im not even sure what the_posts_pagination() is…
Thanks for the response! Hmm… interesting.
For reference: the_posts_pagination() is WP’s method for generating page links. I definitely don’t want to use it, but it seems I have to.
This is so frustrating/baffling. Here’s the relevant code I have on my homepage:
<div id="main" class="grid" role="main">
<h1>Quickies</h1>
<?php
/* Query Quickies */
$args = array(
'post_type' => 'quickie',
'posts_per_page' => 24,
'paged' => get_query_var('paged')
);
$quickieLoop = new WP_Query( $args );
while ( $quickieLoop->have_posts() ) : $quickieLoop->the_post();
get_template_part('loop-quickie');
endwhile; wp_reset_query();
/* AJAX Load More plugin */
echo do_shortcode('[ajax_load_more
post_type="quickie"
seo="true"
transition="fade"
posts_per_page="24"
max_pages="0"
offset="24"]');
?>
<div class="gap"></div>
</div><!-- #main .grid -->
<?php get_sidebar(); ?>
<?php the_posts_pagination(); ?>
Okay, I solved it!
As usual, what I thought was the problem was really a symptom of something else. 🙂 The solution was super simple, which I’ll share here in case anyone else runs into a similar issue:
I just needed to set the scroll_distance parameter to 0 (instead of using the default of 150):
[ajax_load_more scroll_distance="0"]
In my case, the reason my pagination block *seemed* required was because it was creating the necessary vertical padding (of 150 pixels) to trigger the default scroll behavior for loading more posts.
Thanks again to dcooney for chiming in on this thread (and for making an awesome plugin).
Excellent! Thanks for following up here.
Cheers,