Hi @dsl225,
You would probably need to add some custom markup to the images in a child theme to make them compatible with the plugin you’re using for lightboxes. The plugin documentation probably has information about the changes required.
— Anders
Thread Starter
John
(@dsl225)
Thanks Anders for that but I realize my message was misleading:
My question is not related to lightbox at all… I’m using a plugin for that but the question is basically about how to make a featured image clickable in order to get it linked to the media file, like it is possible for all other inline images.
I’m already using child theme anyhow.
Sorry for the confusion here.
Hi @dsl225 ,
Ah, no worries. You’ll need to copy the single.php file to your child theme, and change the last occurrence of:
<div class="featured-media">
to:
<a href="<?php the_post_thumbnail_url(); ?>" class="featured-media">
…and change the last occurrence of
</div><!-- .featured-media -->
to:
</a><!-- .featured-media -->
That should do it.
— anders
Thread Starter
John
(@dsl225)
Works great, many thanks!