Title: Delay before lightbox activating
Last modified: August 24, 2016

---

# Delay before lightbox activating

 *  Resolved [powerj](https://wordpress.org/support/users/powerj/)
 * (@powerj)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/delay-before-lightbox-activating/)
 * I have a gallery (core) that has a delay after opening the website where the 
   SLB doesn’t activate. It starts works after clicking on the 4 or 5th image. The
   template has the following
 *     ```
       <?php while($custom_query->have_posts()) : $custom_query->the_post(); ?>
         <?php //Variables ?>
         <?php $images = get_field('image_gallery'); ?>
         <?php if( $images ): ?>
         <?php foreach( $images as $image ): ?>
              <?php $image_url = $image['url']; ?>
             <?php $content="<li><a href='$image_url'><img alt='{$image['alt']}' src='{$image['sizes']['thumbnail']}' /></a>
              <p class='caption'>{$image['caption']}</p></li>"; ?>
             <?php if ( function_exists('slb_activate') ) ?>
             <?php $content = slb_activate($content); ?>
            <?php echo $content; ?>
          <?php endforeach; ?>
       <?php endif; ?>
   
       <?php endwhile; ?>
       ```
   
 * [https://wordpress.org/plugins/simple-lightbox/](https://wordpress.org/plugins/simple-lightbox/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Archetyped](https://wordpress.org/support/users/archetyped/)
 * (@archetyped)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/delay-before-lightbox-activating/#post-6041652)
 * Hi, please provide a link to a page that exhibits the issue you are experiencing
   and I would be glad to take a closer look.
 *  Thread Starter [powerj](https://wordpress.org/support/users/powerj/)
 * (@powerj)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/delay-before-lightbox-activating/#post-6041667)
 * trucksafe dot com dot au /trucksafe-members/members-gallery
 * Thanks
 *  Plugin Author [Archetyped](https://wordpress.org/support/users/archetyped/)
 * (@archetyped)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/delay-before-lightbox-activating/#post-6041671)
 * Thanks. All images appear to be opening properly in the lightbox. Can you provide
   a bit more detail on the issue you’re experiencing?
 *  Thread Starter [powerj](https://wordpress.org/support/users/powerj/)
 * (@powerj)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/delay-before-lightbox-activating/#post-6041691)
 * Is it possible its due to a slow internet connection?
 * I called a friend and its not happening to them, so I guess I’m not too worried
   about it.
 * When I go to that URL and immediately click on any image, I get just a plain 
   image and no lightbox. This happens for 3 – 6 images and then the lightbox starts
   working. It happens in Firefox, Chrome, Safari and iPad. I also tried with my
   mobile hotspot to get a different internet connection but still the same (but
   its very slow also)
 * Thanks for your quick response. Greatly appreciated.
 *  Plugin Author [Archetyped](https://wordpress.org/support/users/archetyped/)
 * (@archetyped)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/delay-before-lightbox-activating/#post-6041728)
 * Hi, a slow connection may be related to your issue. Make sure to allow the page
   to finish loading before clicking on any links. If the page has not finished 
   loading, then SLB’s code may not yet be fully loaded when you click on a link.
 * Please let me know if the images are displayed in the lightbox once the page 
   has completed loading.
 *  Thread Starter [powerj](https://wordpress.org/support/users/powerj/)
 * (@powerj)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/delay-before-lightbox-activating/#post-6041776)
 * Sorry I can’t tell. Today it seems to be working fine. Thanks for your help
 *  Plugin Author [Archetyped](https://wordpress.org/support/users/archetyped/)
 * (@archetyped)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/delay-before-lightbox-activating/#post-6041794)
 * Glad to hear it’s working fine now 🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Delay before lightbox activating’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/simple-lightbox.svg)
 * [Simple Lightbox](https://wordpress.org/plugins/simple-lightbox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-lightbox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-lightbox/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-lightbox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-lightbox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-lightbox/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Archetyped](https://wordpress.org/support/users/archetyped/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/delay-before-lightbox-activating/#post-6041794)
 * Status: resolved