• Hi,

    I am using the responsive lightbox Factory plug in.

    I want to use this plug in to display art. There is a lot of info that needs to go into the captions and to have it read in an easy to read manner while in the light box mode. example:

    Aquatic spaces on Venus #18 ABC,
    1999 Diameter 24″, Height 11′ 1″
    This Gallery New York 1999

    But when I putt he returns in the default caption editor on wordpress, the lightbox no longer works. It takes me to a separate page with the image standing alone with the information.

    Is there a way around this? This is really frustrating 🙁

    Thank you!

    https://wordpress.org/plugins/responsive-lightbox/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author dFactory

    (@dfactory)

    Link to your site please.

    Thread Starter saturngirl3773

    (@saturngirl3773)

    Hi,

    Sorry it has taken me a while to respond. I can’t link to my site because it is not live yet 🙁 any other suggestions or information I could give you to help sort this out?

    Plugin Author dFactory

    (@dfactory)

    Yous has probably has some js errors or custom code replacing native wp items – gallery, images etc.

    I can’t give you any tips without a link, sorry.

    Thread Starter saturngirl3773

    (@saturngirl3773)

    how do I check for JS errors? What do you mean custom code replacing native wp items?

    I started my theme from scratch, because I am just migrating a very simple site over into wordpress. The theme is very basic, I don’t see how I could have any conflicts…

    Also, I am not sure if I trust what you are saying because you are using very strange english grammar. ‘you has probably has’ should be: ‘you probably have’

    Coming here to look for a similar problem. I have the exact same issue. Multi-line captions in the gallery break the lightbox functionality. It ends up linking directly to the image instead of being lightboxed, but only for multi-line captioned images.

    guessing it’s a regex issue.

    I could be wrong but the plugin author didn’t realize that the <a> tag may spread across multiple lines and so possibly in your case on your page it wont trigger. Curious, lets try a test. Locate, and open this file:

    responsive-lightbox\includes\class-frontend.php

    We are going to make a few simple changes. So before you do make a backup of this file. Once u are done these changes you want to put it on your website server.

    So, we are going to make two changes, the first on line 82 and the 2nd on line 179. The new change is identical for line 82 and line 179.

    Old Line:

    preg_match_all( '/<a(.*?)href=(?:\'|")([^<]*?).(bmp|gif|jpeg|jpg|png)(?:\'|")(.*?)>/i', $content, $links );

    New Line:

    preg_match_all( '/<a(.*?)href=(?:\'|")([^<]*?).(bmp|gif|jpeg|jpg|png)(?:\'|")(.*?)>/is', $content, $links );

    All i did was add the letter “s” (its a regex modifier which allows for the dot metacharacter to match new lines).

    Let me know if this resolves your problem. If not then u can put it back to the original file and we can keep trying to figure it out.

    Cheers
    Kimberly

    PS – i dont have the plugin installed so i am only going by code observations.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Captions mess up lightbox’ is closed to new replies.