How to make featured image link to post
-
Hello, please i need help making my featured image link to post, normally when you click on the featured image its supposed to take you to the post but its not so on my site. I’ve played around with all the codes i know, read support topics but still can’t get the featured image to link to post. I’m using “Patus” free wordpress theme and the theme support forum is inactive. Please someone should kindly help out. Thanks
Please note that I’ve tried adding;
add_filter( 'post_thumbnail_html', 'my_post_image_html', 10, 3 ); function my_post_image_html( $html, $post_id, $post_image_id ) { $html = '<a href="' . get_permalink( $post_id ) . '" title="' . esc_attr( get_post_field( 'post_title', $post_id ) ) . '">' . $html . '</a>'; return $html; }
to functions.php but it ain’t working. and below is the only code in my functions.php that has to do with thumbnails:
add_theme_support( 'post-thumbnails' ); add_image_size( 'large-thumb', 650, 300, true );
Thanks.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to make featured image link to post’ is closed to new replies.