WordPress.org

Forums

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

  1. thescarletfire
    Member
    Posted 1 year 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?

    Thanks

  2. alchymyth
    Forum Moderator
    Posted 1 year 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(); ?>
    		</div>

    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(); ?>
    			</a>
    		</div>

    [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
    Member
    Posted 1 year 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!

    S

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.