Site logo

[Resolved] Display image caption in WP Featherlight lightbox

Home Forums Support [Resolved] Display image caption in WP Featherlight lightbox

Home Forums Support Display image caption in WP Featherlight lightbox

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2128761
    Dorin

    I applied image captions using Media (also title, alt text and description), yet there’s nothing showing in WP Featherlight’s lightbox. Any idea why? It’s showing only when adding the caption from the gallery block on each individual image, which is something I rather avoid doing, it’s easier adding directly from Media.
    Found this related code, but it doesn’t work (added as Hook Element on the entire site).

    #2128777
    David
    Staff
    Customer Support

    Hi there,

    to the best of my knowledge WP Featherlight uses Javascript to simply clone the HTML ( of the image you click on ) – so for the Caption to be displayed it has to be part of that markup.

    But the core Gallery Block should auto add the caption if there is one attached to the image ?
    It does on the latest version of WP for me.

    #2128852
    Dorin

    Hi David,

    You’re right, now I see the issue. The images don’t have captions yet, but the gallery blocks containing those image are already created. If I place a caption in Media to an image that’s part of the gallery already created, it doesn’t update the caption’s respective image in that gallery block. That is why I didn’t see the captions. Can this be fixed somehow?

    #2128863
    David
    Staff
    Customer Support

    That core block isn’t dynamic – in the sense that it saves what you add to the page and after that it has no relationship to the media attachments meta. So it looks like you have to manually update each image in the gallery or add a new gallery to the page.

    #2128875
    Dorin

    Got it. Thanks so much, David.

    #2128893
    David
    Staff
    Customer Support

    You’re welcome

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.