Combining SLB with ACF (lightbox only showing overlay)
-
Dear developers,
I’m trying to use this plugin with the Advanced Custom Field gallery. So far i placed this code in my template:
<?php $images = get_field('climbs-gallery'); if( $images ): ?> <div class="gallery"> <ul class="list-unstyled list-inline"> <?php foreach( $images as $image ): $content = '<li class="list-inline-item">'; $content .= '<a class="gallery_image" href="'. $image['url'] .'">'; $content .= '<img src="'. $image['sizes']['thumbnail'] .'" alt="'. $image['alt'] .'" />'; $content .= '</a>'; $content .= '</li>'; if ( function_exists('slb_activate') ){ $content = slb_activate($content); } echo $content;?> <?php endforeach; ?> </ul> </div> <?php endif; ?>
I got this code from the ACF forum and it seems to be working. The only problem is that there is no image being displayed in the lightbox. Only the overlay works. See the link to the page (the 4-5 images below the featured image) as an example.
Any help regarding my code or this plugin, would be greatly helpful (for this and future projects).
Thank you in advance,
LuukThe page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Combining SLB with ACF (lightbox only showing overlay)’ is closed to new replies.