• Hi, wonderful plugin and incredibly easy to setup and use.

    Is there a way to display the title of the photo in the lightbox?

    Ideally I would like to display the title and caption, or title and description.

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter picsporadic

    (@picsporadic)

    I figured out a way to “hack” around this by putting the title and caption in the description with custom classes and hiding the original caption that the lightbox displays.

    I enabled the “.. also use description if available” checkbox and used the following CSS to hide the caption:

    .pswp__caption__center {    position: relative;
        left: -9999px;}
    
    .pswp__description {    position: relative;
        left: 9999px; margin-top:-25px}
    • This reply was modified 4 years, 10 months ago by picsporadic.
    • This reply was modified 4 years, 10 months ago by picsporadic.
    • This reply was modified 4 years, 10 months ago by picsporadic.
    • This reply was modified 4 years, 10 months ago by picsporadic.
    Plugin Author Arno Welzel

    (@awelzel)

    There are already many ways to get the caption, but some are only used if others are not available. The next major update will contain a bit more control about what things are used for the caption at all and it will also provide a nice tabbed backend interface ;-).

    See https://user-images.githubusercontent.com/6613614/81839794-508fb280-9548-11ea-85d3-0d0ed1a87d24.png

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Title and caption in lightbox’ is closed to new replies.