I will show a gallery on the home template. I call the gallery and I will show only 8 images. After the 8 images I need a button to call more images.
How do I make this?
<div class="container galerie">
<div class="row">
<?php
$images = get_field('startseite_gallerie');
if( $images ): ?>
<ul>
<?php foreach( $images as $image ): ?>
<li class="col-lg-4 col-md-4 col-sm-4 col-xs-6">
<a href="<?php echo $image['url']; ?>">
<img src="<?php echo $image['sizes']['galerie']; ?>" alt="<?php echo $image['alt']; ?>" />
</a>
<?php echo $image['caption']; ?>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div>
</div>
Hi @philnickel
ACF has only the ability to retrieve the images data for you. If you need to show the images with AJAX functionality, I think you need to use a JS or jQuery plugin.
I hope this makes sense 🙂