开发者

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

I want to get an rss feed for a sing开发者_StackOverflow中文版le 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


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


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');

?>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜