data-max-pages always set to 0
-
I’m using the plugin on a page that runs a loop with custom post types.
data-max-pages is always set to 0, so when I click the load more button it keeps loading posts that are already on the page.Here’s what my code looks like (without the html markup):
<?php $work_args = array( 'post_type' => 'work', 'posts_per_page' => 8 ); $work_query = new WP_Query($work_args); ?> <?php if ($work_query->have_posts()): ?> <?php while ($work_query->have_posts()): $work_query->the_post(); ?> <!-- what I want to show for each post --> <?php endwhile; ?> <?php load_more_button(); ?> <?php endif; ?> <?php wp_reset_query(); ?>
What am I doing wrong?
Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘data-max-pages always set to 0’ is closed to new replies.