X Gallery + lightbox

Hi guys,

i have a question. i remember there used to be a way to use the lightbox shortcode and show only 1 image of a gallery which would link to the entire gallery once you clicked on it.

There used to be a guide and everything on the old forum but i can’t remember how to do so.

Ijust want to achieve the following:

i want to have 1 image that would represent a gallery of images. when clicked, it would open the gallery itself with X’s lightbox horizontal view.

could you help me achieve that, please?

this is what i have so far:

[gallery link="file" ids="2118,2117,2116,2115,2114,2112,2111"]
[lightbox selector="#gallery-1 .gallery-icon a" thumbnails="true"]

The only thing i need is to have a trigger image, which i wouldn’t know how to do because i can’t add a class as a trigger (otherwise the gallery wouldn’t be linked in the lightbox).

Hi There,

You can use those shortcodes and also add this custom CSS under X > Theme Options > CSS:

div#gallery-1 dl.gallery-item {
    display: none;
}
div#gallery-1 dl.gallery-item:first-child {
    display: inline;
}

Let us know how it goes!

wow guys, you rock!

by the way, props for the speed of response, you have totally increased your reply speed! awesome service as always.

1 Like

If you need anything else please let us know.

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