Buy All 48 Premium WordPress Themes for $54.99

How to Display Caption in Lightbox Images

LightBox Display Caption

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

About the Author

Tihomir Ivanov is a WordPress and Salesforce Commerce Cloud (SFCC) developer, founder of, a fan of Linux and Open Source, Minimalism (in Design and Life), Sci-fi, Fantasy, Classic and History books :)

Leave a Reply