Twenty Thirteen
Featured Image is not clickable? (3 posts)

  1. thescarletfire
    Posted 2 years ago #

    Every theme I've worked on before has had the featured image of the blog post clickable (just the same as if a visitor had clicked on the header/title of post).

    I have a child theme based off 2013 default theme and this has never worked, even from the parent theme itself.
    Why is this? And can someone please help me figure out how to get the featured image on posts clickable, per normal?


  2. Michael
    Forum Moderator
    Posted 2 years ago #

    Why is this?

    that is the way it is programmed in the templates.

    how to get the featured image on posts clickable

    look into content.php

    <div class="entry-thumbnail">
    			<?php the_post_thumbnail(); ?>

    wrap the thumbnail code into a link tag with the permalink to the post;
    basic example:

    <div class="entry-thumbnail">
    			<a href="<?php the_permalink(); ?>">
    			<?php the_post_thumbnail(); ?>

    [edit: typing error in the code corrected]

    (if some of your posts are using post formats, also look into the content-{postformat}.php templates)

  3. thescarletfire
    Posted 2 years ago #

    Hmm, thank you! I did not know that. I've always been lucky I guess, with every theme I've used all having the clickable featured image load the post itself :)

    I'll check out the php file for content, thanks again!! You are the best!


Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic


No tags yet.