Suggest your visitors to leave comments in your rss feed

February 18, 2009 · Print This Article

Most bloggers like to receive comments about their posts. How to display a message on your rss feed, and notifying your visitors that the discussion is open and suggesting them to comment?

Additionally, when using WordPress as CMS, sometimes it is necessary to create new posts instead of pages for static pages because you want them to appear in the RSS feed. You may not want to enable comments inside those posts.

At other cases, you may also want to selectively choose to enable and disable comments. The problem is, how do you prevent your RSS feed subscribers from clicking with the intention to leave comment while the comment is disabled?

How about giving them a clue at the end of the post? Just put the following code in the functions.php file within your active theme:

function rss_comment_footer( $content ) {
if ( is_feed() ) {
if ( comments_open() ) {
$content .= "\n\nComment is open. You can participate in the discussion
by visiting <a href='".get_permalink()."'>here</a>\n";
return $content;

Your choice for site templates and wordpress themes


Got something to say?

You must be logged in to post a comment.