• I’m using the theme Atahualpa which has a Featured Image setting in the Post editing form. I uploaded an image into the beginning of a post, then went back and clicked on Featured Image and set that image at the featured one.

    I also added the code from the Codex page “Function Reference/the post thumbnail” page into my functions.php file near the top of the file. And saved my changes.

    Then I refreshed my blog homepage. But the image is not linked to the permalink (or anything else).

    What did I miss? Thank you!

    – Doug

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter dougcoe

    (@dougcoe)

    The code I added to the functions.php file is:

    add_filter( ‘post_thumbnail_html’, ‘my_post_image_html’, 10, 3 );

    function my_post_image_html( $html, $post_id, $post_image_id ) {

    $html = ‘‘ . $html . ‘‘;
    return $html;

    }

    The link to the post may not be included in the template.

    Can you provide a link to your site please?

    Thread Starter dougcoe

    (@dougcoe)

    Christine–Thank you for the reply (and quick, too!). My site is:

    https://dougcoe.com/blog/

    My understanding was that the code snippet would work regardless of the theme. But I’m not a pro blog creator, just trying to tweak my own blog.

    I think that in order for the thumbnails to link to the post, the theme files need to be edited.

    I downloaded the theme, but I’m extremely confused.. That is some complex theme.

    Maybe you can send the theme developer an email?

    Thread Starter dougcoe

    (@dougcoe)

    Christine—I’m not surprised the theme is complex. It’s highly flexible. Also, quite popular I believe.

    I guess I’ll go to the developer for some help, though I think he might send me back here!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Linking featured image to permalink–not working’ is closed to new replies.