-
AuthorPosts
-
October 19, 2020 at 10:47 am #1253884October 19, 2020 at 3:56 pm #1254033
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,
NikkoOctober 20, 2020 at 8:13 am #1254251Hi Nikko,
thx, works perfectly. Can I also display the image-description below the image automatically?Thx, regards
-
This reply was modified 5 years ago by
Wulius.
October 21, 2020 at 6:39 am #1254558Hi 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,
NikkoOctober 27, 2020 at 3:23 pm #1256101This works fine, thx a lot.
Regards
Wulius -
This reply was modified 5 years ago by
-
AuthorPosts
- The topic ‘lightbox-effect in accordeon’ is closed to new replies.
