PHP Magic Book – Free PHP Scripts, Tutorials and Downloads, PHP AtoZ Reloaded, free php tutorials, free php downloads, php scripts, PHP tips

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

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.

  • Share/Bookmark
Tags: ,
Posted in: Hacks, WordPress
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0

Related Posts




2 Responses to “Provide RSS Feed for Each Post and Comment at Your WordPress Blog”

  1. Jul 28, 2009
    Webdesign Stuttgart Says:

    Hello. I think your code is very interesting. I will try it and tell you will it work for me. I think that it might be a good way to provide a rss feed for the comments of a specific post. I will ask for your help if I come on some problems with code implementation.

  2. Sep 29, 2009
    King Says:

    @Webdesign Stuttgart: Thanks. Sure!

Post a Comment

  Subscribe Via RSS
  Subscribe Via Email