Lightbox + Image Element

Hello, i was wondering if there was a way to setup the lightbox shortcode with the image element from PRO.

I have 6 images and i wanted to create a lightbox out of it.

I though adding a selector like “.x-media” or maybe even a class like “.rg-slide” to the selector parameter of the lightbox (And adding the class to the actual images) would do it but it doesn’t work so i think there must be something else i’m missing.

Could you help me out?

Thanks!

Hi Alejandro,

Thank you for reaching out to us. Yes you can do this with image element in content builder. First add an image element and turn on the Link option:

Then in URL field input the URL of the image you want to show in lightbox:

Now give a class to your image element e.g lightbox-image

Finally add a Text or Classic Raw Content element with the Lightbox shortcode:

[lightbox selector=".lightbox-image"]

Repeat the above steps for other images except adding the Lightbox shortcode multiple times, just add it once. To learn more about Lightbox shortcode please see https://theme.co/apex/forum/t/shortcodes-lightbox/165

Hope this helps!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.