Thanks in advance for any help or input.
I have this code getting all the rows in an ACF Repeater and displaying them as square blocks.
<div class="class_wrapper">
<?php if( have_rows('classes') ): ?>
<div class="class_blocks">
<?php while( have_rows('classes') ) : the_row(); ?>
<div class="class-callout-block" style="background:url(<?php the_sub_field('class_image'); ?>);">
<h2><?php the_sub_field('title'); ?></h2>
</div>
<?php
endwhile;
endif;
?>
</div>
What I am trying to achieve is when a block is clicked, the div below populates with the same content as the block clicked. ie. it calls the same repeater row.
If anyone can point me in the right direction it would be greatly appreciated.
JavaScript
here. – Prajwal