How to add comments links to your MT RSS Template

One thing I liked when I first started using WordPress was that the RSS feeds had a comments entry, and in readers like Bloglines, it would render a nice “Comments” hotlink below each post. The downside was that (at least with the version of WP 1.5 I used) it would add the comments link to every post, whether they were enabled or not.

I’ve been meaning to do the same feature in my MT blog here, ever since I started enabling comments. Scott’s recent redesign added the feature and today I noticed that I was getting feedback in email from a post that had comments enabled — in other words, people are reading my stuff in an aggregator, and then emailing me a response instead of posting comments and adding to the entry’s conversation. So I finally added it to my feeds, and it works in Bloglines nicely. Here’s the code to add somewhere in between your item elements of your RSS 2.0 feed:

<MTEntryIfAllowComments><comments>
<$MTEntryPermalink archive_type="Individual"$>#comments
</comments></MTEntryIfAllowComments>

That’s it!

2 Comments

Comments are closed.