Support » Plugin: WP Featherlight - A Simple jQuery Lightbox » Super light, no bloat, tip to extend caption in lightbox

  • I love minimalism, saving resources and increasing speed, so this is for sure my choice (even though I expect that a recent review was right that the closing could be better on mobiles).

    But I needed to extend the captions on pictures to include a copyright notice in the lightbox view (which would have been too much in page view). So I looked at the code and found that the WordPress media library is not queried at all, so no way will we get the media library description for an image.

    This is how to get out of that problem with some manual coding on pages: JS finds all images on the page, and gets their captions e.g. target.parent().find( ‘.wp-caption-text’ )

    So if the caption contains a <span> this can be used together with the class „featherlight“ of the outer lightbox <div> to add an extended description hidden on the page via CSS but shown in the lightbox.

    Thanks to all the contributors and PLEASE keep this great plugin alive!

  • You must be logged in to reply to this review.