Home Forums Add-ons Gallery Field Gallery Ajax


Gallery Ajax

  • 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">
    $images = get_field('startseite_gallerie');
    if( $images ): ?>
            <?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']; ?>" />
                    <?php echo $image['caption']; ?>
            <?php endforeach; ?>
    <?php endif; ?>
  • 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 🙂

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Gallery Ajax’ is closed to new replies.