Does not work with featured/thumbnail image
-
In my theme I am using this code to show the featured/thumbnail image of the post:
<?php if ( has_post_thumbnail()) { $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large'); echo '<a href="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" >'; the_post_thumbnail('medium'); echo '</a>'; } ?>
But Simple Lightbox does not hook into the code on the front end and the link goes to the image source.
I tried adding
data-slb-active="1" data-slb-internal="0"
to the img tag, but it did not work. What is the best way to get Simple Lightbox to work with the featured image?https://www.ads-software.com/extend/plugins/simple-lightbox/
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Does not work with featured/thumbnail image’ is closed to new replies.