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.

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.

share|improve this question
    
RSS feed only sends excerpt and never the full article. And an RSS feed don't have a read-more link. But do you want a read-more link for your article listing? Is that what you mean? –  Steven Dec 13 '10 at 10:28
1  
Do you really need a 'read more'? Anyone able to use an RSS reader will know to click on the title to read the rest. –  TheDeadMedic Dec 13 '10 at 14:40
    
@TheDeadMedic - That's a good point, I just wanted it to look the same as the blog itself. –  Giorgi Dec 13 '10 at 16:24
add comment

4 Answers

up vote 3 down vote accepted

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.

share|improve this answer
add comment

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

<?php
function moreFeedlink($content) {
    $content = $content.'<div><a href="'.the_permalink().'">Read More</a></div>';
    return $content;
}
add_filter('the_excerpt_rss', 'moreFeedlink');
?>
share|improve this answer
add comment

You could implement the function but that might change how your posts are displayed on site, not sure as been a while since I've used the function!

Might be worth a scan through this - http://codex.wordpress.org/Customizing_the_Read_More

share|improve this answer
add comment

Go to reading settings and select 'full text' for what to show readers in a feed: alt text

share|improve this answer
    
I have already tried it but it shows full text instead of breaking it at 'more' shortcode –  Giorgi Dec 13 '10 at 17:43
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.