Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Adicionando e apontando o link do post_thumbnail para o seu respectivo post
- add_filter( 'post_thumbnail_html', 'cms_post_image_html', 10, 3 );
- function cms_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;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement