Is your feature request related to a problem? Please describe.
Featured images on the blog page do not link to the individual post, currently the just function as images. User wanted to be able to click on the featured image to view a post in addition to clicking the post title.
Describe the solution you'd like
Adding a toggle to control whether or not the featured image links to its associated post.
Describe alternatives you've considered
Used a filter on post_thumbnail_html to add the link for the post.
function link_featured_images( $html, $post_id, $post_image_id ) {
$html = '<a href="' . get_permalink( $post_id ) . '" title="' . esc_attr( get_the_title( $post_id ) ) . '">' . $html . '</a>';
return $html;
}
add_filter( 'post_thumbnail_html', 'link_featured_images', 10, 3 );
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
Featured images on the blog page do not link to the individual post, currently the just function as images. User wanted to be able to click on the featured image to view a post in addition to clicking the post title.
Describe the solution you'd like
Adding a toggle to control whether or not the featured image links to its associated post.
Describe alternatives you've considered
Used a filter on
post_thumbnail_htmlto add the link for the post.function link_featured_images( $html, $post_id, $post_image_id ) {$html = '<a href="' . get_permalink( $post_id ) . '" title="' . esc_attr( get_the_title( $post_id ) ) . '">' . $html . '</a>';return $html;}add_filter( 'post_thumbnail_html', 'link_featured_images', 10, 3 );Additional context
Add any other context or screenshots about the feature request here.