Skip to content

Commit

Permalink
Include a posts featured image in RSS feeds.
Browse files Browse the repository at this point in the history
  • Loading branch information
tlongren committed Jul 20, 2011
1 parent a5591e9 commit 8171ae9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions functions.php
Expand Up @@ -220,6 +220,19 @@ function html5press_link_filter($link, $post) {
return $link;
}

// Add featured post images to RSS feed
add_filter('the_excerpt_rss', 'html5press_feed_thumbnail');
add_filter('the_content_feed', 'html5press_feed_thumbnail');
function html5press_feed_thumbnail($content) {
global $post;
if(has_post_thumbnail($post->ID)) {
$content = '<p>' . get_the_post_thumbnail($post->ID) .
'</p>' . get_the_content();
}

return $content;
}

// Setup featured posts slider
function html5press_featured_posts() { ?>
<div id="slider-wrapper">
Expand Down

0 comments on commit 8171ae9

Please sign in to comment.