Hi Wulius,
Yes, please do the following:
1. Click the image and add a link to it, then paste the image URL (the one you want to appear in the lightbox, you can open a new tab and open Media > Library and copy the URL from there)
2. Switch the mode from Visual to Text and you should see something like this (only for 1 image)
<a href="http://website.com/wp-content/uploads/2020/10/image.jpg"><img class="alignnone size-medium wp-image-965" src="https://website.com/wp-content/uploads/2020/10/image-300x150.jpg" alt="" width="300" height="150" /></a>
3. After the href add a class attribute with a value of lightbox ( class=”lightbox” ) the code should look like this:
<a href="http://website.com/wp-content/uploads/2020/10/image.jpg" class="lightbox"><img class="alignnone size-medium wp-image-965" src="https://website.com/wp-content/uploads/2020/10/image-300x150.jpg" alt="" width="300" height="150" /></a>
4. Repeat these steps on your other images.
Hope it helps :)
Best regards,
Nikko
Hi Nikko,
thx, works perfectly. Can I also display the image-description below the image automatically?
Thx, regards
Hi Wulius,
I’m glad to hear that :)
Just add a title attribute to the image, here’s how it should look like (I removed some attributes here for the sake of example)
<a href="image_url" class="lightbox"><img src="image_url" title="Title Here" /></a>
Best regards,
Nikko
This works fine, thx a lot.
Regards
Wulius