Add Post Excerpt to RSS Feed

Include post excerpts in RSS feeds.

<?php
function add_excerpt_to_rss_feed($content) {
    if (is_feed()) {
        return get_the_excerpt();
    }
    return $content;
}
add_filter('the_content', 'add_excerpt_to_rss_feed');
?>

Post Comment