Show ‘Read more’ in rss feed

How can I show ‘Read more’ links in rss feed instead of showing excerpt? The settings in reading only allow to choose between full content and excerpt.

Related posts

Leave a Reply

4 comments

  1. You can, but you shouldn’t.

    RSS feeds are built in XML. Not in HTML. Links in XML don’t have meaning because they’re HTML elements. However, because XML can be read by most HTML parsers (i.e. web browsers), you can easily mistake an XML document for an HTML one (the prevalence of XHTML helps to blur this line even further).

    In reality, though, no one actually reads a raw XML feed. They open the feed in a web browser and let the browser parse it into something intelligible. Firefox and Safari are very good at this actually. Or they open it in an eternal feed aggregator like Google Reader.

    All of these other applications will parse the content permalink (your post’s url) and use it as a contextual reference for the post. In some cases, they’ll add the “read more” link for you. In others, they’ll convert the title to a click-able link in the display.

    In either case, you’re relying on the reader to generate the link, not on the rendered content of your post.

    For example, here is the feed for my blog – http://mindsharestrategy.com/feed – rendered by Safari. The browser has both turned the title into a link and automatically added a “Read More …” link to the bottom of each post.

    Blog feed in Safari web browser

    The key thing to remember is that this feed is a raw XML document that was parsed automatically by the browser. I did not specify any of the styling, colors, or even the Read More link … Safari did that all on its own. Firefox actually only displays an excerpt for each post rather than the full post content (each followed by an auto-generated “Read More” link). Google Reader does something very similar, as will most other feed aggregators.

  2. You could choose to show the summary (excerpt) in the feed and adding this to your theme’s functions.php:

    function moreFeedlink( $content ) {
        $content = $content . '<div><a href="' . get_permalink() . '">Read More</a></div>';
        return $content;
    }
    add_filter( 'the_excerpt_rss', 'moreFeedlink' );