Title: jjf21's Replies | WordPress.org

---

# jjf21

  [  ](https://wordpress.org/support/users/jjf21/)

 *   [Profile](https://wordpress.org/support/users/jjf21/)
 *   [Topics Started](https://wordpress.org/support/users/jjf21/topics/)
 *   [Replies Created](https://wordpress.org/support/users/jjf21/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/jjf21/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/jjf21/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/jjf21/engagements/)
 *   [Favorites](https://wordpress.org/support/users/jjf21/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ajax Load More – Infinite Scroll, Load More, & Lazy Load] How to add post loop to repeater template](https://wordpress.org/support/topic/how-to-add-post-loop-to-repeater-template/)
 *  Thread Starter [jjf21](https://wordpress.org/support/users/jjf21/)
 * (@jjf21)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/how-to-add-post-loop-to-repeater-template/#post-8712750)
 * I’ve attached my new repeater template, but it is still not working.
 * [https://www.dropbox.com/s/95pcuhivp3sfvuw/default.php?dl=0](https://www.dropbox.com/s/95pcuhivp3sfvuw/default.php?dl=0)
 *     ```
       <?php
       /*
        * Template Name:
        */
   
       $the_query = new WP_Query( [
           'posts_per_page' => 14,
           'paged' => get_query_var('paged', 1)
       ] );
   
       if ( $the_query->have_posts() ) { ?>
           <div id="ajax-load">
           <?php
           $i = 0;
           while ( $the_query->have_posts() ) { $the_query->the_post();
   
               if ( $alm_item % 7 === 0 ) {  // Large posts ?>
               <article <?php post_class( 'col-sm-12 col-md-12' ); ?>>
                   <div class="large-front-container">
       <?php the_post_thumbnail('full', array('class' => 'large-front-thumbnail')); ?>
                       </div>
                   <h2><a class="post-title" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
                   <p class="front-page-post-excerpt"><?php echo get_the_excerpt(); ?></p>
                   <a class="moretext" href="<?php the_permalink(); ?>">Read more</a>
                       <?php get_template_part ('front-page-shop'); ?>
                                        <?php get_template_part( 'share-buttons' ); ?>
                       <div class="front-comments"><?php comments_popup_link ('0', '1', '%', 'comment-count', 'none'); ?></div>
                   </article><?php
   
               } else {  // Small posts ?>
                   <article <?php post_class( 'col-sm-6 col-md-4' ); ?>>
                       <div class="front-thumbnail-image"><?php the_post_thumbnail('full', array('class' => 'medium-front-thumbnail')); ?></div>
                       <a class="front-page-post-title" href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
                       <p class="front-page-post-excerpt"><?php echo get_the_excerpt(); ?></p>
                       <a class="moretext" href="<?php the_permalink(); ?>">Read more</a>
                       <?php get_template_part ('front-page-shop'); ?>
                                        <?php get_template_part( 'share-buttons' ); ?>
                       <div class="front-comments"><?php comments_popup_link ('0', '1', '%', 'comment-count', 'none'); ?></div>
                   </article>
                   <?php
               }
               $i++;
           }?>
           </div>
           <?php if(get_query_var('paged') < $the_query->max_num_pages) {
           }
       }
       elseif (!get_query_var('paged') || get_query_var('paged') == '1') {
           echo '<p>Sorry, no posts matched your criteria.</p>';
       }
       wp_reset_postdata();
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ajax Load More – Infinite Scroll, Load More, & Lazy Load] How to add post loop to repeater template](https://wordpress.org/support/topic/how-to-add-post-loop-to-repeater-template/)
 *  Thread Starter [jjf21](https://wordpress.org/support/users/jjf21/)
 * (@jjf21)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/how-to-add-post-loop-to-repeater-template/#post-8710906)
 * Here is a link to my front-page.php file. As you can see I have 14 posts per 
   page. 1 in a row, 3 in a row, 3 in a row. I just want to add the load more button
   after every 14 posts. However, I don’t know how I could achieve this. I would
   appreciate any help!
 * [https://www.dropbox.com/s/ax15kaa8msvunoe/front-page.php?dl=0](https://www.dropbox.com/s/ax15kaa8msvunoe/front-page.php?dl=0)

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