Home / RSS Feeds / featured-images-rss-feed
Duplicate Snippet

Embed Snippet on Your Site

featured-images-rss-feed

MARK BOGDANOVIC (COSMO MEDIA D.O.O., UL.POHORSKEGA BATALJONA 57,LJUBLJANA,SLOVENIJA SI19178808
<10
Code Preview
php
<?php
function featuredtoRSS($content) {
global $post;
if ( has_post_thumbnail( $post->ID ) ){
$content = &#39;<div>&#39; . get_the_post_thumbnail( $post->ID, &#39;large&#39;, array( &#39;style&#39; =>
&#39;margin-bottom: 15px;&#39; ) ) . &#39;</div>&#39; . $content;
}
return $content;
}
add_filter(&#39;the_excerpt_rss&#39;, &#39;featuredtoRSS&#39;);
add_filter(&#39;the_content_feed&#39;, &#39;featuredtoRSS&#39;);

Comments

Add a Comment