-
AuthorPosts
-
February 18, 2020 at 8:05 pm #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!
February 19, 2020 at 9:00 pm #1186174Hey 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,
BasilisFebruary 19, 2020 at 9:46 pm #1186183Basilis,
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. :)February 19, 2020 at 9:58 pm #1186185The 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?
- 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
February 24, 2020 at 8:48 am #1187228Hi,
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,
IsmaelFebruary 26, 2020 at 2:11 am #1187915Hi Ismael,
I’ll tinker around with this and see if I can get it to work. Thanks for your helpful suggestion.February 27, 2020 at 10:10 am #1188356 -
AuthorPosts
- You must be logged in to reply to this topic.