Okay
  Public Ticket #2674299
Possible to show captions on images (not portfolio item Lightbox)
Closed

Comments

  •  6
    nuraugen started the conversation

    Hey there,

    My portfolio item type is "Side Portfolio" and I have some pictures in the "Project Gallery" there. I am able to show the images' caption on mouse over, but when I click an image and it opens up in a large view then there is no title or caption visible.
    Would it be possible to turn this on somewhere?

    Thank you.

  • [deleted] replied

    Hi nuragen,

    I understand the point here, however, this is not implemented currently in our theme so to show titles in lightbox please add this code in functions.php of Kalium child theme (or parent theme):

    add_filter( 'kalium_portfolio_gallery_image_titles_lightbox', '__return_true' );

    For this code to work, you need to replace this file one time only because with the new release of Kalium it will contain by default:

    Download this file and replace it in this directory (of the theme): /kalium/tpls/

    To see how this works check this video:

    https://d.pr/v/J6Bo69

  •  6
    nuraugen replied

    Excellent! Very cool.
    Probably a stupid question: does this work with child/demo themes by putting it into the Kalium/tpls/ directory, or do I have to create a kalium-child/tpls/ kalium-child-NAMEOFDEMO/tpls/ folder in each child/demos themes' folder and put the file into it for it to work?

    PS: I'd try to style it so that the caption looks like the caption we can see on the portfolio page (square corners and semi translucent background). Just for consistency.

  • [deleted] replied

    Hi,

    I am glad that this worked for you. 

    Regarding the template file, all you need to care is this code:

    add_filter( 'kalium_portfolio_gallery_image_titles_lightbox', '__return_true' );

    The template file I gave you is changed in our original theme files so the future updates will contain it.

    For styling of captions you can add CSS in Custom CSS so that would not lose when you update the theme as well.

  •  6
    nuraugen replied

    Thanks!

    [Edit]

    Maybe you could implement a checkbox in the theme's options to enable/disable it. I'm pretty sure that people will ask about disabling it once the theme is officially changed to show captions on single lightbox images.  😅

  • [deleted] replied

    Hi nuraugen,

    We are going to implement a better lightbox in Portfolio Options and we will add such feature, for the moment I suggest you to keep this workaround as it will work with upcoming Kalium releases.

  •  6
    nuraugen replied

    Will do. Thanks again.