Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1185809

    I’m looking for a way to display an image’s caption when it is used in a full width media slider. I am not referring to the caption attributed to the element within the full width slider. Rather, I’m looking for a way to display the caption shown in the media attributes, but while the image is in the slider. The goal is to display a photo credit (the caption), yet, preserve the caption area in the element (in the slider settings). I’ve seen threads that seem to be talking about the element caption (animated text in the slider), but not the media caption. Any advice is appreciated. Thanks!

    #1186174

    Hey milkrow,

    Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Basilis

    #1186183

    Basilis,
    I wasn’t implying that the work to custom code this functionality would be covered by support, as you implied. But if there was a setting I could change to show the caption, then knowing that would be helpful. I suspect a number of users would find it helpful to know how to do this so that photos used in slideshows could, in fact, display a photographer’s credit. Seems pretty useful, I think. Also, to be clear, I want to make sure you understand that I’m referring to “caption”, the longstanding nomenclature of “caption” used to refer to the content associated with each media item, versus what the full width slider refers to as “caption” (the text animated over a slide). Best to eliminate the confusion. If anyone else sees this and has anything to add, feel free. If the current CSS is making that caption invisible, clue me into where that is done? If the media caption isn’t called at all, when a full width slider is used…would a layered slider allow me to display it? More helpful feedback is greatly appreciated. :)

    #1186185

    The feature in the image media element allows for a caption to be added as an overlay, but why not allow the media caption to be used…for example, as a checkbox to allow the original caption vs. the input field used in this element?

    Use image caption

    • This reply was modified 4 years, 9 months ago by milkrow. Reason: revised after further review of the feature in image media caption, to clarify the discussion
    #1187228

    Hi,

    Thank you for the info.

    This is possible but you have to modify the config-templatebuilder > aviashortcodes > av-helper-slideshow.php file, manually fetch the image caption and include it in the slider template. The caption markup is inside the default_slide function around line 321:

    $caption = trim($slide->post_excerpt) ? '
    <div class="avia-caption capt-bottom capt-left">
    <div class="avia-inner-caption">'.wptexturize($slide->post_excerpt)."</div>
    </div>
    ": '';
    

    These functions should help.

    // https://codex.wordpress.org/Function_Reference/wp_get_attachment_metadata
    // https://developer.wordpress.org/reference/functions/wp_get_attachment_caption/

    Best regards,
    Ismael

    #1187915

    Hi Ismael,
    I’ll tinker around with this and see if I can get it to work. Thanks for your helpful suggestion.

    #1188356

    Hi,

    You’re welcome. We’ll keep the thread open in case you need more information.

    Best regards,
    Ismael-

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.