I have one weird thing happening with lightbox on my website. If I add a lightbox image or gallery and then click on the image, the first time it will navigate directly to the image file. If you then click the back button and click the image again, lightbox loads up normally.

Any thoughts on why reloading the page after the first click makes lightbox work properly?


example page

  • what browser? loads fine in the lightbox first time for me in webkit.
    – Milo
    Commented Jan 29, 2013 at 2:03
  • chrome on the mac
    – Brian
    Commented Jan 29, 2013 at 2:06
  • Mac Chrome working fine on my end.
    – brasofilo
    Commented Jan 29, 2013 at 2:16
  • 1
    voted to close, as this appears to be a js/css/networking issue, not an issue with WordPress itself or one that requires WordPress knowledge
    – Tom J Nowell
    Commented Jan 29, 2013 at 10:42
  • Also your lightboxes work fine for me on your example page, but there are a number of 404s and the page took a while to load. Consider reducing the filesizes and optimising the size and number of images to reduce bandwidth
    – Tom J Nowell
    Commented Jan 29, 2013 at 10:44

2 Answers 2


Its just you. I tried from fast internet computer and it loads fine the first time. Then I tried from a low speed computer before the page completely loaded, and it acts the way you described. So its all about loading and fast internet connection

  • Always test answers before accepting else you're doing a disservice to other users if it's actually wrong
    – Tom J Nowell
    Commented Jan 29, 2013 at 10:43
  • It seems to be an intermittent issue with chrome on mac. Tried it on multiple computers. I wasnt able to reproduce on other browsers.
    – Brian
    Commented Jan 29, 2013 at 16:21

It's because lightbox script starts working, when page is loaded, but if you press link to img before it's loaded, it'll just work like there is no script - just opens image.

  • I always waited for the page to fully load. Thanks
    – Brian
    Commented Jan 29, 2013 at 16:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.