Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wpb_autolink_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', 'wpb_autolink_featured_images', 10, 3 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement