Featured Images missing from my RSS feed?


function featuredtoRSS($content) {
global $post;
if ( has_post_thumbnail( $post->ID ) ){
$content = ‘div html tag open‘ . get_the_post_thumbnail( $post->ID, ‘medium’, array( ‘style’ => ‘margin-bottom: 15px;’ ) ) . ‘div html tag close‘ . $content;
}
return $content;
}

add_filter(‘the_excerpt_rss’, ‘featuredtoRSS’);
add_filter(‘the_content_feed’, ‘featuredtoRSS’);

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s