Get All 139 Premium WordPress Themes for Just $59.99
One-Time Payment: Unlimited Use Across Unlimited Domains, Plus Free Lifetime Updates!

How to Display Caption in Lightbox Images

How to Display Caption in Lightbox Images

Our premium themes comes with built-in Lightbox which allow you to display images in dialog boxes.

We have updated our Lightbox JavaScript files to display captions (screenshot above). Here is a guide how it can be done:

1. Login to your Admin Panel, navigate to Left Menu -> Appearance -> Customize -> ‘Lightbox’ section and make sure the options for display of Lightbox are Checked.

2. Open a Page or Post for edit in Admin Panel

3. Insert an image with ‘Link to Media file’ option set

Link to Media File

3. Edit the image as HTML

edit image as HTML

5. At the and of <a > tag, inset data-title=”Your Caption TEXT”, i.e.

<figure class="wp-block-image"><a href="" data-title="Lorem ipsum dolor sit amet, primis platonem dignissim"><img src="" alt="" class="wp-image-419"></a></figure>

6. Save Changes

Leave a Reply