Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WordPress: how can I get rss feed of just a single post?

I want to get an rss feed for a single post, meaning I just want the whole article in an rss format, exlcuding comments. Is there a way for me to do this in wordpress?

Thanks

like image 761
Morne Zeelie Avatar asked Sep 01 '11 12:09

Morne Zeelie


People also ask

How do I pull an RSS feed from WordPress?

Where Can You Find Your RSS Feed URL in WordPress? Finding your RSS feed URL within WordPress is simple. All you need to do is type in the name of your website, and add “/feed” to the end of the URL. You'll then be brought to the XML file that displays the WordPress feed in its raw form.

How do I customize my WordPress RSS feed?

Edit Your RSS Feed Before and After Content Simply, click on the tag you want to add to the field and the link will be included in your feed. You can also type the hashtag character ( # ) in the field and it'll display a list of available tags you can choose from.

How do I limit the number of RSS feeds in WordPress?

Change Posts Limit in WordPress RSS Feed First thing you need to do is go to Settings » Reading page in your WordPress admin dashboard. From here, you need to change the value next to the 'Syndication feeds show the most recent' option. Simply enter the number of posts you want to be shown in your RSS feed.

Is it possible to customize your RSS feeds?

Fortunately, you can customize your RSS feed relatively easily by adding a few lines of code. Note that this method may not be suitable for beginners as you'll need to access your child theme's functions. php file. However, most intermediate users should be able to follow the instructions below.


2 Answers

Appreciate this is an old one but incase anyone else stumbles upon this, append ?withoutcomments=1 to your URL:

http://mediasafari.com/news/marketing-careers-announces-two-new-courses/feed/rss/?withoutcomments=1
like image 123
Matt Shepherd Avatar answered Sep 20 '22 11:09

Matt Shepherd


Adding /feed/rss/ on the end of a url give the excerpt of the post for example:

http://mediasafari.com/news/marketing-careers-announces-two-new-courses/feed/rss/ 

If you change your excerpt to show the full article then that should work:

<?php

function rssFullText($content) {
    global $post;
    $content = $post->post_content;
    return $content;
}

add_filter('the_excerpt_rss', 'rssFullText');

?>
like image 34
dciso Avatar answered Sep 24 '22 11:09

dciso