/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// THIS LINKS THE THUMBNAIL TO THE POST PERMALINK 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; }
URL: http://wordpress.org/support/topic/making-post-thumbnail-link-to-post
Comments
