Open peter2211 opened 11 years ago
On the link calling image add title tag to that link such as:
title="Add a title on the image"
Then that will be the title of the image.
Thanks Carasmo. Perhaps I need to explain further. Since there are about 10 images associated with each product, I need the text to automatically pull from the 'description', or 'caption' field, which are filled out when adding images via the uploader....
Any advice?
Thanks,
Don't work with wordpress but I imagine it's like any other database driven CMS. You'd locate the code (smarty, php, whatever) and find the loop and locate the tag you're supposed to use and plop it in the a href tag's title field. You'll probably need to find a wordpress person to help you and you'll need to use something to strip out entities too (they will know what I mean).
Try applying a filter to the output of the WP image. I'm assuming you can do that. You'll need to grab the attachment caption, description etc, and set them to something like data-caption, data-description in the tag.
Don't forget to add this in the initialization of the gallery: image: { titleSrc: 'title', } // Attribute of the target element that contains caption for the slide.
I have a wordpress site (with woocommerce plugin) that came with Magnific-Popup. The lightbox is triggered on the single product pages to view product images in the lightbox.
The only issue is that the description (or caption) for the images is not displayed in the lightbox. For example, "Item shown in Blue".
Is there a snippet of code I could use to get that function to work? And if so, where would I put it? I read the documentation, and I can navigate my way around template files, but just could not figure it out.
Thank you for any help you could give.
Cheers,