Support » Plugin: Simple Lightbox » Combining SLB with ACF (lightbox only showing overlay)

  • Resolved Luuk Arends

    (@jorelarends2016)


    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,
    Luuk

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Archetyped

    (@archetyped)

    Hi, it appears that your site is using a different version of jQuery than what is officially included and supported by WordPress (and thus SLB). Loading an unsupported version of jQuery may cause issues with WordPress, themes, and plugins.

    See here for more information: SLB: jQuery Support

    Loading the version of jQuery that is included with WordPress should allow SLB to function normally. Be sure to clear all caches (browser cache, caching plugins, etc.) after making the change to remove any stale data.

    If you are still experiencing an issue after ensuring the the officially-supported version of jQuery is being loaded, please post an update and I would be glad to reopen this ticket and take another look.

    Thanks.

    Luuk Arends

    (@jorelarends2016)

    Thank you for your response Archetyped. That was the problem and it was fixed by using the 1.12.4 version of jQuery. Bootstrap was using 3.3.1 so I replaced it.

    Thanks again for the support and this great plugin.

    Plugin Author Archetyped

    (@archetyped)

    Glad to hear your issue was resolved! 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.