How to Fix your WordPress Comment Feed Name

Many RSS feed aggregators (like Bloglines, for example) alphabetize the feed names that you’re subscribed to. If you set up WordPress and test your RSS feeds in such a news reader, you’ll notice that your main feed and your comments feed are probably not listed next to each other. To make it easier for your loyal readers to track what’s going on with your site, those feeds should be sorted alphabetically so that they clump together. Read on for a quick solution.

For our example, let’s say your blog is called “My Blog”. A subscriber to your feeds might see this in their news reader:

Subscribed Feeds:

Comments for My Blog

Last Blog Before Mine
My Blog
Next Blog After Mine

We want “Comments for My Blog” and “My Blog” to show up next to each other in the list. To fix this, you’ll need to modify one of your core WordPress files. I’ve tested this change in WordPress 2.0.5, 2.0.7, and 2.0.9, but not in WordPress 2.1. As always, be careful when you modify one of the WordPress core files, and be ready to restore the original version of the file if you run into problems.

To rename your blog’s comment feed name, modify the file wp-commentsrss2.php (line 23 in my version) and change:

<title><?php if (is_single() || is_page() )
  { printf(__('Comments on: %s'), get_the_title_rss()); }
  else
  { printf(__('Comments for %s'), get_bloginfo_rss("name")); }
  ?></title>

to:

<title><?php if (is_single() || is_page() )
  { printf(__('Comments on: %s'), get_the_title_rss()); }
  else
  { printf(__('%s Comments'), get_bloginfo_rss("name")); }
  ?></title>

Coming back to our example, a subscriber to both your main RSS feed and your comments feed would now see them listed nicely right next to each other in the subscription list of their news reader:

Subscribed Feeds:

Last Blog Before Mine
My Blog
My Blog Comments
Next Blog After Mine

Note that it may take a few days before the new feed name is reflected in news aggregators–I have found this to be the case with Bloglines, for example.

Update! This problem appears to have been fixed in WordPress 2.3.3.

5 thoughts on “How to Fix your WordPress Comment Feed Name

  1. Pingback: Free Range Librarian » Blog Archive » Location of FRL’s new comment feed; those pesky redirects

  2. Pingback: My del.icio.us bookmarks for August 25th

  3. Pingback: All my bookmarks ever | Daniel John Gayle

Leave a Reply