Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am attempting to fix my RSS feed and have implemented the following code below in my functions.php. How do I go about getting the excerpt text to display in this RSS feed? The following code seems to be working as the featured image is now showing up in my feed (for example at: example.com/feed).

#----------------------------------------------------------------------------------------
# Customize RSS Feed
#----------------------------------------------------------------------------------------

function featuredtoRSS($content) {
    global $post;
    if (has_post_thumbnail($post->ID)) {
        $content = get_the_post_thumbnail($post->ID,'thumbnail') . get_the_excerpt($post->ID);
    }
    return $content;
}

add_filter('the_excerpt_rss', 'featuredtoRSS');
add_filter('the_content_
share|improve this question
1  
Seems to be working? What's the problem then? Also, you're missing some code at the end. –  dalbaeb May 5 '13 at 1:55
    
This part of the code doesn't seem to display the excerpt text in the feed: get_the_excerpt($post->ID) –  Brian May 5 '13 at 13:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.