Support » Plugin: Simple Lightbox » Caption vs Filename

  • Resolved Michiel


    Hi! First of all, thank you for the awesome plugin!! It really works very nice!!

    I have one question: I would only like to display captions in the lightbox, if there are no captions then the lightbox should be empty. Where could I change this in the code? Or could it be added in the admin view of future versions?:)

    Thank you!!!!! Michiel

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Archetyped


    Hi, thanks for the feedback.

    An image’s file name is never used for the caption in SLB. What you are probably seeing is the default title set by WordPress when an image is uploaded. The “Title” field is required, so if you don’t set a custom title, WordPress generates one based of the image’s file name.

    As the Title field is required for media by WordPress, it is used as a fallback for caption in the lightbox. Here is more information on how SLB’s caption text is determined.

    HI! You are right, it is the “title” field indeed.

    In my case the “title” field contains the image name, e.g. IMG_7503 and the caption shows a short description of the image. I’d like only the caption to show under the photo in the lightbox.

    Something like this:
    – If “caption then “display caption”, otherwise “show nothing”

    I can add it in the code myself, just don’t know which file to edit 🙂

    Thank you very much for your support!!!

    Plugin Author Archetyped


    You can create a custom theme to fully control what content is displayed in the lightbox:

    Tutorial: Creating a Custom Theme for Simple Lightbox

    In your theme’s layout, using the {{item.caption}} template tag (instead of {{item.title}}) will display an item’s caption only when one is available.

    Have fun!

    Awesome!!! Thank you!!!! and have a great 2014!!

    Hello and thank you for a FANTASTIC plugin!
    Wasn’t sure if I have to start new topic, but my issue is very similar to the one resolved above, though I’m still unable to get it to work!

    Website is and I’m using NextGen image gallery plugin. Everything works fine, but I’m trying to use image ALT TEXT / DESCRIPTIONS form NextGen and they are not displaying on Simple Lightbox. I tried {{item.title}} to {{item.caption}} change suggested above, but then image title disappears altogether! Please advise! Thank you!

    Plugin Author Archetyped


    @creator2000: For future reference, starting a new topic for your particular issue is recommended so that the discussion is focused on resolving your issue. See here more information on forum posting guidelines.

    In your case, the instructions provided in this thread are not applicable as they are specific to items from WordPress’ media library, not NextGen Gallery.

    Access to NextGen Gallery’s metadata fields (description, etc.) will be provided via an add-on to SLB. This add on is currently in development. You can register to receive updates on new add-ons on Simple Lightbox’s home page.

    Hello Archetyped
    An add-on for nextgen can’t come soon enough.

    I presume You mean legacy nextgen, can’t get V2 to update correctly, and NG V2 still does not allow third party lightboxs. I am using “NextCellent Gallery – NextGEN Legacy” plugin at the moment, which has been a way to continue to get some upgrades to NG 1.9.

    @archetyped: Thank you! I experimented with NextGen gallery properties and was able to change variable that get passed into your plugin. All good now!

    Plugin Author Archetyped


    @marklcm: Yes, part of the reason for a delay on the NGG add-on is the issues they’ve been having with v2. Ideally the add-on would support the official version that is being maintained. I may survey users to see which version most people are using.

    @creator2000: Sweet!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Caption vs Filename’ is closed to new replies.