« The revolution will be ajaxified | Main | links for 2005-10-22 »
October 21, 2005
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!
Posted at October 21, 2005 04:09 PM

Comments
Interesting note: It also works with Atom feeds, although not documented. Tested in Bloglines.
Posted by: Sujay
at October 22, 2005 11:56 AM
It works in NetNewsWire, too. A little "comment" link in the post's metadata panel lights up. Clicking takes you to the anchored comment area on the post archive page.
Posted by: Jeffrey Veen
at October 27, 2005 04:50 PM
Post a comment
Thanks for signing in, . Now you can comment. (sign out)
(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)