Repeater template breaks load more
-
I have a repeater template with some php code to add html after an x amount of posts. Somehow this breaks the load more functionality.
If I only keep the div with class ‘post’ it works, but when I add the container wrap and blog-left on top and the </div> on the bottom it breaks.
This means it will show the first 4 posts and a load more button, but the button does not respond. (Scrolling load more does not seem to work at all).Here is the code I am using:
<?php if($alm_current%4 === 1 || $alm_current === 1) { ?> <div class="container wrap-<?php if($alm_current%2 === 0){echo 'even';} else {echo 'odd';} ?>"> <div class="blog-left"> <?php } ?> <div class="post-<?php echo $alm_current; ?> posts"> <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail(); ?> <div class="post-label"> <?php if (get_post_type() == 'projecten') { ?> <span class="type-tag">Project</span> <?php } if (get_post_type() == 'post') { ?> <span class="type-tag">Nieuws</span> <?php } ?> <span class="blog-title"><?php the_title(); ?></span> </div> </a> </div> <?php if($alm_current === 3 || $alm_current%4 === 3) { echo '</div>'; } ?> <?php if($alm_current%4 === 0) { echo '</div>'; } ?>
Thank you for any help you can provide.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Repeater template breaks load more’ is closed to new replies.