• Resolved jamkaret

    (@jamkaret)


    Hello,

    Great plugin, especially because you paid attention to performance as well.
    That said, i am wondering how to enable the lightbox for Advanced Custom Fields’ gallery. The code i am using to grab gallery images is below.

    <?php 
    
    $images = get_field('gallery');
    
    if( $images ): ?>
        <ul>
            <?php foreach( $images as $image ): ?>
                <li>
                    <a href="<?php echo $image['url']; ?>">
                         <img src="<?php echo $image['sizes']['thumbnail']; ?>" alt="<?php echo $image['alt']; ?>" />
                    </a>
                    <p><?php echo $image['caption']; ?></p>
                </li>
            <?php endforeach; ?>
        </ul>
    <?php endif; ?>

    I noticed that you do support native WordPress galleries. Maybe ACF isn’t pulling in a native gallery?

    Thanks!

    https://www.ads-software.com/plugins/wp-featherlight/

Viewing 1 replies (of 1 total)
  • Thread Starter jamkaret

    (@jamkaret)

    Solved by adding:

    <div data-featherlight-gallery data-featherlight-filter="a">

    Before the foreach;

Viewing 1 replies (of 1 total)
  • The topic ‘Using alongside ACF’ is closed to new replies.