Home › Forums › Add-ons › Gallery Field › ACF gallery + simple lightbox problem › Reply To: ACF gallery + simple lightbox problem
i’m seeing this issue too – almost certainly i’m doing something stupid but i’ve done this now in so many sites and i can’t for the life of me figure out what’s different here.
here’s the code:
<?php $images = get_field('project_images');
if( $images ): ?>
<div class="car-main-col" id="masonry-wrap" data-columns>
<?php foreach( $images as $image ):
$content = '<div>';
$content .= '<a class="gallery_image" href="'. $image['url'] .'">';
$content .= '<img src="'. $image['sizes']['medium'] .'" alt="'. $image['alt'] .'" />';
$content .= '</a>';
$content .= '</div>';
if ( function_exists('slb_activate') ){
$content = slb_activate($content);
}
echo $content;?>
<?php endforeach; ?>
</div>
<?php endif; ?>
and the page can be seen here: https://dev-cro.matmartin.co.uk/project/function/
i’ve tried running it outside the masonry plugin (salvattore.js) and in separate default page templates without the extra functionality. no dice.
any help would be most welcome.
thanks.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🚀 This week’s session of ACF Chat Fridays dips into the preliminary results of our first ever user survey. Don’t miss it! https://t.co/3UtvQbDwNm pic.twitter.com/kMwhaJTkZc
— Advanced Custom Fields (@wp_acf) May 9, 2023
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.