Created
May 6, 2020 15:48
-
-
Save pradeepdotco/cf18511b92c16eeabbd789a7a1893a23 to your computer and use it in GitHub Desktop.
Adding Link to the featured Image - Genesis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function featuredtoRSS($content) { | |
global $post; | |
if ( has_post_thumbnail( $post->ID ) ){ | |
$content = '<a href=" . get_permalink() . " rel="nofollow ugc">' . get_the_post_thumbnail( $post->ID, $imgsize, array( 'style' => 'float:left; margin:0 15px 15px 0;' ) ) . '</a>' . $content; | |
} | |
return $content; | |
} | |
add_filter('the_excerpt_rss', 'featuredtoRSS'); | |
add_filter('the_content_feed', 'featuredtoRSS'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment