WordPress.org

Ready to get started?Download WordPress

Forums

Simple Lightbox
[resolved] Caption vs Filename (10 posts)

  1. Michiel
    Member
    Posted 8 months ago #

    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

    http://wordpress.org/plugins/simple-lightbox/

  2. Archetyped
    Member
    Plugin Author

    Posted 8 months ago #

    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.

  3. Michiel
    Member
    Posted 8 months ago #

    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!!!

  4. Archetyped
    Member
    Plugin Author

    Posted 8 months ago #

    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!

  5. Michiel
    Member
    Posted 8 months ago #

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

  6. creator2000
    Member
    Posted 7 months ago #

    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 5uper5ite.com 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!

  7. Archetyped
    Member
    Plugin Author

    Posted 7 months ago #

    @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.

  8. Marklcm
    Member
    Posted 6 months ago #

    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.

  9. creator2000
    Member
    Posted 6 months ago #

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

  10. Archetyped
    Member
    Plugin Author

    Posted 6 months ago #

    @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!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags