AJAX Load More plugin: Repeating posts 6 times on “Load more”

I am having some problems with the AJAX Load More plugin in WordPress…
I have created a new repeater template, but when the “load more” button is clicked, it displays the same posts 5 times…
What it should do is display 6 posts, but instead is displaying 6 different posts 6 times…

This is my Shortcode:

<?php echo do_shortcode('[ajax_load_more post_type="post" posts_per_page="6" pause="true" offset="7" scroll="false" button_label="Load more"]'); ?>

This is my Repeater template:


$loop_one = array( 
    'category_name'  => 'article',
    'posts_per_page' => 4,
    'orderby' => 'post__in'

$query_one = new WP_Query( $loop_one ); ?>
    <?php if ( $query_one->have_posts() ) :
        while ( $query_one->have_posts() ) : $query_one->the_post(); ?>

            <?php if (has_post_thumbnail()) {
                the_post_thumbnail(array(150,150)); } ?>
                <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
            <p class="entry-meta">
                <?php the_time("F d, Y"); ?>
            <?php the_excerpt(); ?>

    <?php endwhile; ?>
        <?php wp_reset_postdata(); ?>

    <?php else : ?>
        <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
    <?php endif; ?>


I’ve changed the shortcode to posts_per_page=”1″ and that solve the problem of repeating the posts 6 times.
So now, when I click “Load more” it displays 4 posts, but when I click again to see more posts, it displays the same 4 posts…
Any idea why?

Read more here: AJAX Load More plugin: Repeating posts 6 times on “Load more”

Leave a Reply

Your email address will not be published. Required fields are marked *