• Resolved csleh

    (@csleh)


    I’m using version 1.1.0 of featherlight. I installed it and it’s working on image galleries without me doing anything. Captions are not showing though, and I would like them to, but I cannot figure out how to do that. The captions are included with the media file and show on the page. I read the documentation but it doesn’t help me because I’m not a programmer. I looked through the plugin files too but that seems like the wrong place to make changes.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Robert Neu

    (@fatmedia)

    Hey csleh,

    The captions should be working by default without you needing to do anything. Can you provide a link to where you’re having an issue so I can check this out for you?

    Thread Starter csleh

    (@csleh)

    that would be great, thank you!

    https://dev.sullivanlehdesigns.com/work/trafficsafety-org-website/

    not the large first image in a circle, scroll a bit to the others that have captions

    Plugin Author Robert Neu

    (@fatmedia)

    Hmm..

    It looks like your images are missing the wp-caption-text class from the captions. This is a class that WordPress core adds to images when you add a caption within the WordPress editor.

    Do you have any idea why those would be removed?

    Thread Starter csleh

    (@csleh)

    huh. no. I started with an underscores theme and use standard wordpress install and updates. No modifiers in the theme functions file, so I’ll check if underscores does something in one of the files not called. This is a weird one.

    Nice catch, not sure I ever would have noticed!

    Thread Starter csleh

    (@csleh)

    silly me. On those pages the gallery is actually from custom fields, not the default wordpress gallery, so I coded them myself. Got that one fixed. My other pages I forgot to put link to media file, not attachment page.

    Note: to get the prev/next arrows on a gallery other than wordpress default (like using Advanced Custom Fields instead, for instance), a few classes need to be added: gallery, gallery-item, and if you want captions to show in the lightbox, wp-caption-text. As always, any images that link to media file are automatically grabbed by the plugin through the link, so no extra classes needed. Without the extra classes the lightbox works, just no arrows between images in the same gallery.

    <div class="gallery">   
        <figure class="gallery-item">
            <a href="...">
     	    <img src="..." alt="..." />
            </a>
     		<figcaption class="wp-caption-text">...</figcaption>
       </figure>
    </div>

    Making this note to remind myself.
    Great plugin!

    • This reply was modified 7 years, 9 months ago by csleh.
    • This reply was modified 7 years, 9 months ago by csleh. Reason: added code sample for non-wordpress gallery to navigate through images
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘how to have captions appear’ is closed to new replies.