A long time ago, I blogged about some code I had written for ds106 that made it possible to show how many comments had been left on a post that was being syndicated (via FeedWordPress) from elsewhere. The code was pretty simple — it was based on the fact that some feeds (including ones originating from WordPress) pass a parameter called “wfw:commentRSS” which contains the RSS feed of the comments on an individual post. FWP stores this as a custom field for each syndicated post. So, it’s pretty easy to grab that RSS feed URL, fetch the feed, and then count the number of items in it.
When I came up with this technique back in 2011 I implemented it by editing the theme for ds106. Eventually, however, we removed the code. I seem to remember we thought it was impacting performance on the site. Depending on how many posts were displayed on the home page, that was a lot of RSS retrieval that needed to be done before the page could be displayed.
This week, Jim asked me if I could put the code on the site being used for the (awesome, new) Digital Scholars Initiative at UMW. I went ahead and did it, and in doing so I thought perhaps it was time to return to this code and see if I could improve it. Continue reading Remote Comments Plugin (a FWP “AddOn”)