- This topic has 1 reply, 1 voice, and was last updated 3 years, 4 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Forums › UPFront WordPress Theme › Gallery Shortcode – Show caption also on the enlarged image
Hey there, i’ll have to ask for your help again:
When i use the Gallery shortcode on a post i can choose to show or not show the image caption on mouseover, witch is great for me since this website needs to show photo credits. We need to show the image caption on the enlarged version (after the user clicks the image and it shows the enlarged one).
I can see that the shortcode uses lightbox so i know for a fact that this is possible by adding “data-title”attr to the link, but how can i enable it?
Thx in advance
Got it figured out with jquery, the code below will grab the text of the caption and insert it as the title attribute as desired.
jQuery( "span.collage-caption" ).each(function() {
var titleattr = jQuery(this).text();
jQuery(this).prev().attr('title', titleattr);
});
Anyway, it would be nice to have a similar option to enable / disable this feature on the shortcode` (show title on enlarged image)
Subscribe to our newsletter to receive news & updates. We promise to not spam you, super promise!
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.