[Plugin: Gallery to Slideshow] add class to slide link
-
LOVE this plugin, was great out of the box and has been easy to customize (added my own thumbnail images, got next/previous arrows, etc) ….but now i’m in a bit over my head and hoped you could help.
i want to use the jquery colorbox plugin with it, so that if a user clicks the image being displayed it will enlarge. when i tell the colorbox plugin to automatically add itself to all images in wordpress galleries, it DOES…. and the result is that the enlarged colorbox image comes up (not only when you click the main image like i want it to do) but ALSO when the thumbnails are clicked. so instead of serving as a navigational feature, the thumbnails link directly to the colorboxed version of the image.
the solution for this is NOT to select the setting that makes colorbox add itself to all images AUTOMATICALLY, but to do it manually instead. this is done by adding the class “colorbox-link” to any
a
tag you wish to have opened in the colorbox. SO…. i need to add it to the main images and NOT the thumbnails.my problem is that im not great with PHP and cant get it worked into that string so it outputs correctly.
for example, what would normally be output as:
<a title="1" href="https://example.com/web/wp-content/uploads/2011/12/image1.jpg"><img class="attachment-large" width="500" height="300" title="1" alt="caption testing" src="https://example.com//web/wp-content/uploads/2011/12/image1.jpg"></a>
i need to be:
<a class="colorbox-link" title="1" href="https://example.com/web/wp-content/uploads/2011/12/image1.jpg"><img class="attachment-large" width="500" height="300" title="1" alt="caption testing" src="https://example.com//web/wp-content/uploads/2011/12/image1.jpg"></a>
any direction you could give me in modifying the php to do that would be greatly appreciated. thanks for your time!
https://www.ads-software.com/extend/plugins/gallery-to-slideshow/
- The topic ‘[Plugin: Gallery to Slideshow] add class to slide link’ is closed to new replies.