Can’t seem to get anything to load. Not sure if I need to set it as a repeater or a flexible. Either way nothing loads or is there. I’m hardcoding the shortcode within my custom page template like this:
<?php if ( have_rows( 'page_builder' ) ): ?>
<?php while ( have_rows( 'page_builder' ) ) : the_row(); ?>
<?php if ( get_row_layout() == 'endorsements' ) : ?>
<!-- ENDORSEMENTS -->
<div id="endorsements">
<h2>Endorsements</h2>
<?php echo do_shortcode('[ajax_load_more preloaded="true" preloaded_amount="6" posts_per_page="6" scroll="true" button_label="Load More" button_loading_label="Loading..." acf="true" acf_field_type="repeater" acf_field_name="single_endorsement" container_type="div" css_classes="endo-flex" transition="fade"]'); ?>
<?php endif; ?>
</div>
<?php elseif ( get_row_layout() == 'chapter_download' ) : ?> ...
And my repeater template in ALM like this:
<article>
<?php
$img = get_sub_field('img');
$img = $img['sizes']['thumbnail'];
?>
<div class="single">
<?php if ( $img ) { ?>
<div class="left"><img src="<?php echo $img; ?>" alt="" /></div>
<?php }?>
<div class="right"><?php the_sub_field('copy');?></div>
</div>
</article>