Solution: featured image as link to post
-
When a new post is displayed on the main page, only the h2-caption is clickable and leads the users to the entire post. Since people love clicking on images, I wanted to make the featured image of each post a clickable link, too.
this seems to work (solution found here, and I applied it, honestly without really knowing what I was doing ??
edit the themes/shapedblog/content.php and add a link to the existing code.
find:
<?php the_post_thumbnail('shaped-blog-thumb', array('class' => 'img-responsive')); ?>
replace with:
<!-- added a href link begin //--> <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail('shaped-blog-thumb', array('class' => 'img-responsive')); ?> </a><!-- featured image as Link end //-->
- The topic ‘Solution: featured image as link to post’ is closed to new replies.