Making the featuerd image clickable

Hi, When I set a featured image to a post, it shows up great. However, when I open the post I’m not able to click this image such that a larger version of it opens. Is there a way to link this featured image to the media file and make it clickable?

This is expected behavior as it shows cropped image there and right now there is no link there to a full image.

To make it work that way you should replace

<?php the_post_thumbnail( 'sparkling-featured', array( 'class' => 'single-featured' )); ?>

in content-single.php with

 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( 'sparkling-featured', array( 'class' => 'single-featured' ));
   echo '</a>';

This can be done via Child Theme as well by copy/pasting this file to Child Theme folder and then editing it.

Thanks Aigars. That worked. My lightbox does not seem to be working here but it does work when I insert the image in the post. Any ideas why that happens?

Because lightbox plugin doesn’t target this image as usually they are target particular image class or all images that are inside content. Look if there aren’t some specific settings for your lightbox plugin that would allow to target more images by their class. Then you could use single-featured class.