Provide RSS Feed for Each Post and Comment at Your WordPress Blog

by Hiroshi on November 24, 2008

in Hacks, WordPress

If a post gets lots of comment, it can be hard for your readers to stay on the conversation. WordPress blogging engine have a built-in function for providing rss feed for the comments of a specific post.

Add RSS Feed Link For Comments on Each Post

In order to provide a rss feed for the comments of a specific post, you just have to call the comment_rss_link() function like below:

<?php comments_rss_link('Comments RSS Feed'); ?>

You can put this code in WP LOOP to display RSS for post’s comments from each post right beneath itself.

Similarly we can add a rss link on each post.

Add RSS Link on Each Post

<a href="<?php bloginfo('url'); ?>?feed=rss&p=<?php the_ID(); ?>" target="_blank">RSS 2.0</a>

You can put this code in WP LOOP to display RSS from each post right beneath itself.

Related Posts

Previous post:

Next post: