Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    This cannot be done in Photonic. You can show either the title, or the description – not both (Photonic → Settings → Flickr → Flickr Settings → Photo titles and captions). The reason for this is that the setting is lightbox-agnostic, and most lightboxes support display of only one text field.

    I can consider making this a feature for a future release.

    Thread Starter godvsgodvs

    (@godvsgodvs)

    I know it can’t be done with settings. I would like to modify the php file to override the setting in my child theme. I just need to know where the code is located.

    BTW, I think this is very important and should be included in a future release. I have members that add photos to Flickr and include a title and description, but when they go to my site they will see only one. Perhaps it should be included in the Lightbox Library settings along with the other Lightgallery settings like Zoom and Thumbnail. Just a checkbox to include both title and description.

    Thanks

    Plugin Author Sayontan Sinha

    (@sayontan)

    Open the file wp-content/plugins/photonic/layouts/Layout_Default.php, and go to line 200. The line currently says:

    
    if (!empty($title)) {
    

    Above this line, put in:

    $title = esc_attr($photo['title']).esc_attr($photo['description']);

    Modify the markup as required.

    Thread Starter godvsgodvs

    (@godvsgodvs)

    Thanks! That works and I added a HTML break ‘<br/>’ between the two variables.

    The code works. However the user above (godvsgodvs) refers to adding a HTML break between the two variables. How is this done?

    Thread Starter godvsgodvs

    (@godvsgodvs)

    Like this:

    $title = esc_attr($photo['title']).'<br/>'.esc_attr($photo['description']);

    • This reply was modified 8 years, 7 months ago by godvsgodvs.

    That doesn’t work for me. It’s just run-on from title to description.

    Ah, Nevermind it does work for me. It doesn’t work when hovering over items in the grid but does work in the lightbox. Is there a way to add a break when hovering over each photo in the grid?

    Plugin Author Sayontan Sinha

    (@sayontan)

    No, there is no way to do that. Titles don’t support HTML markup.

    Thread Starter godvsgodvs

    (@godvsgodvs)

    Doesn’t work with JQuery Tooltip. I’m using slide up from bottom.

    Thread Starter godvsgodvs

    (@godvsgodvs)

    Sayontan,

    The line break works fine with the Lightgallery lightbox and also when using slide up from bottom in the Flickr Main Page settings.

    Gary

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Both Title & Description In Lightbox’ is closed to new replies.