I wish to use one thing to filter photographs inside an ACF Gallery. I’ve added the Enhanced Media Gallery Plugin which can permit me to assign a class to every picture, however am not not clear on echo out that class record so it may be clicked and filter/show photographs within the class chosen.
Moreover, how would I echo the class assigned to the picture within the div surrounding the picture
My loop at present appears to be like like this to output my gallery.
I might be pleased about any recommendation on one of the best ways to assign classes to every picture in my gallery (is a plugin greatest right here?) and likewise seize these classes and type. Thanks in Advance!
<div class="wrapper-gallery" >
<?php
$photographs = get_field('photographs');
if( $photographs ): ?>
<?php foreach( $photographs as $picture ): ?>
<div class="gallery-image" id="imageGallery">
<determine >
<a href="<?php echo $picture['url']; ?>" data-size="<?php echo $picture['width'] . 'x' . $picture['height']; ?>">
<img src="<?php echo $picture['sizes']['large']; ?>" alt="<?php echo $picture['alt']; ?>" />
</a>
<figcaption ><?php echo $picture['caption']; ?></figcaption>
</determine>
</div>
<?php endforeach; ?>
<?php endif; ?>

