Recent Comments


Unfortunately, due to ill-health, this plugin has not been developed or supported properly for some years. It works with the latest versions of WordPress (including on this website) but could possibly conflict with any WordPress features added after 2008 — e.g. custom post types — if you use them.


This plugin displays a list of the most recent comments to your blog in a highly customisable way.

This is version download latest version. It is compatible with WordPress 1.5–2.6.2.

Please note the new upgrade instructions!

The plugin has an settings page which lets you change how the output is generated and displayed.

Installation Instructions

  1. If upgrading from a previous version, first deactivate the plugin via the Plugins page and delete the plugin folder from your server.
  2. Upload the plugin folder to your /wp-content/plugins/ directory. You will also need to install the Post-Plugin Library.
  3. Go to your admin Plugins page and activate Recent Comments.
  4. Put<!--?php recent_comments(); ?--> at the place in your theme files where you want the list of similar posts to appear. Lorelle on WordPress has a good guide to modifying themes for plugins. If you are using a widget-ready theme the plugin can be placed from the widget admin page.
  5. Use the admin Options|Recent Comments page to set all the available options. Alternatively, the options can be overridden by passing a parameter to the recent_comments template tag.

Usage and Options

The configuration page will help you to set up the plugin to your satisfaction.

If you also install the latest version of Plugin Output Cache the output of this plugin will be automatically cached for efficiency.


  • 1. Rob  |  March 17th, 2008 at 6:19 pm

    Version 2.5 b3 posted

  • 2. Komik Videolar  |  March 21st, 2008 at 5:32 am

    Great plug-in….

  • 3. Partz Partzescu  |  April 4th, 2008 at 12:31 pm

    Can you add a function to load Mybloglog avatars when no Gravatar is available? There is a plugin for this but it doesn’t work with recent comments. The plugins Name is MyAvatar.

  • 4. marka,logo tasarımı  |  April 8th, 2008 at 12:35 pm

    nuxmedya marklaşmaya yönelik kurumsal kimlik tasarımı ile ilgili

    profesyonel çalışmalar yapmaktadır

  • 5. Yuda  |  April 8th, 2008 at 2:59 pm


    Thanks for your great plugins!

    I’m using Recent Comments, and on my dev machine (Apache) it runs fine.
    However, when uploaded to my host (IIS, as per client’s request), I get a CGI error when trying to access any tab except the General Config tab on the admin section.
    And the plugin doesn’t work at all :-(

    CGI errors when running WP on IIS are a known issue for years, and there’s a fix that sometimes work using a special wp-db.php file – see recent post here:

    But usually the problem is on the front-end, and this time it’s only on the back, and only on the Recent Comments plugin tabs.
    Maybe there’s something that can be done through the plugin code, something along the lines of the wp-db.php fix.

    BTW, the WP version where the trouble arose is 2.3.1, for which the fix should work, but on the Recent Comments case it doesn’t.

    I appreciate your help very much!


  • 6. Rob  |  April 8th, 2008 at 9:07 pm

    Yuda: I’m not sure I know enough to respond in any useful way. Does this link have any relevant suggestions?

  • 7. Rob  |  April 8th, 2008 at 9:10 pm

    Yuda: How does the wp-db.php fix work — it’s hard to tell where the fix is? Also do you have the same problem with my other post plugins? Or is it just Recent Comments? Could you test?

  • 8. Yuda  |  April 8th, 2008 at 10:50 pm

    Hi Rob, thanks for your reply.

    The modified wp-db.php can be found here:

    I used it once on another WP Windows installation, where I also had CGI errors, and it evaporated them – so as your plugins are using the DB, maybe what was done in wp-db.php can be applied to other files as well.
    I’m aware wp-db.php should (and does) solve DB-related CGI errors across the board, but still… Just a hope.

    I will test the other plugins. The client didn’t ask for them, so they can thank you for the nice bonus :-)

    Thanks again

  • 9. Yuda  |  April 8th, 2008 at 11:25 pm

    Caught it!

    I have no idea why, but the URL of any options page, except for General Settings, in both plugins, and only on IIS, includes a redundant section, eg:

    Anything I did wrong?

    Thanks again

  • 10. Rob  |  April 8th, 2008 at 11:32 pm

    Yuda: Now that is interesting! I hope that lets me track down the problem… Unfortunately, it is late here and I need to go sleep so it will be a while before I can get back to you.

    Thanks for all the effort!

  • 11. Rob  |  April 8th, 2008 at 11:36 pm

    Yuda: Could you send me a copy of the output of var_dump($_SERVER) for both a good page and one that is showing a duplication?

  • 12. Yuda  |  April 8th, 2008 at 11:51 pm

    OK, some more data: after stripping the redundant section, the options pages worked nicely, so did their saving.
    But whenever I tried to move to another options page (and only among them) – I got the double URL section.

    BTW, this also happened on the General Settings page, it just so happens that on the first call to the Recent Comments/Posts pages, it’s the General Settings tab that comes first – and correct.

    But at least now I have a beautiful Recent Comments plugin working on the site! (it’s still under heavy dev, so no URL just yet).

    Re the dump file – sorry, no can do, the host (oddly enough called easyCGI – go figure) does not provide access to it.

    I do have access to IIS log files – will they help?

    Have a good sleep!


  • 13. Rob  |  April 9th, 2008 at 7:53 am

    Yuda: Good morning! (Well, cold, wet and unpleasant actually)

    It sounds like this should be fixable! (the plugin, not the weather). BTW what I was asking for wasn’t a dump file but just for you to use var_dump($_SERVER) or print_r($_SERVER) on the pages in question so that I can get to see what the values of those globals are. Obviously they are setup differently to ‘usual’ and knowing what they are could really help. Do you see what I mean?

  • 14. John Kolbert  |  April 13th, 2008 at 2:58 am

    I just upgraded the plugin (I’ve been using it for a while) and where my recent comments used to be it now says: “post-plugin library missing”. What does that mean and how do I fix it?

  • 15. John Kolbert  |  April 13th, 2008 at 3:00 am

    Ah, never mind about my comment above. I upgraded using the auto-upgrade feautre on WordPress. I should know to check the plugins website first. Sorry!

  • 16. Rob  |  April 13th, 2008 at 7:49 am

    John Kolbert: No problem! It is unusual for one plugin to require another. I wish there were a way to make it more bulletproof. Any ideas?

  • 17. Chris  |  April 14th, 2008 at 9:06 pm

    Rob, I downloaded the most recent version of this plugin and uploaded it to my plugins dir and it wouldn’t show up in the list of available plugins in order for me to activate it.

    Do you know anything about this?

    I’m running a standard install of WP 2.5.


  • 18. Rob  |  April 14th, 2008 at 10:20 pm

    Chris: I just downloaded a copy myself and it looks fine. Was this an update or a new install? Did you remove any previous folder?

    If all else fails, delete the folder you uploaded and try again.

  • 19. Rob  |  April 15th, 2008 at 10:11 am

    Chris: I’m glad to hear it is now working for you.

  • 20. tbronson  |  April 16th, 2008 at 4:09 pm

    Dunno if this belongs here, nor if it’s a known problem in general, but:

    After upgrading to RC 2.5b19 using WP 2.5’s automatic plugin updating, my comments page displayed a no results found message. I fiddled around with it, resaved all the settings, but nothing. So I downloaded a copy and ftp-ed to overwrite the installed version, and everything was fine.

    I guess it was a problem with WP auto updating, a file wasn’t copied or something?

  • 21. Rob  |  April 16th, 2008 at 4:35 pm

    tbronson: That’s very useful to know, thank you.

  • 22. C.Harv  |  May 1st, 2008 at 6:08 pm

    Looked at configuration page, but can’t figure out how to change “commented on” in Recent Comments to “on.”
    Where do I make this edit?

    Thank you.

  • 23. Rob  |  May 2nd, 2008 at 10:57 am

    C.Harv: You should be able to pass the new text as a parameter to the tag:

    {commentlink: on }

    Let me know if it works for you or not.

  • 24. Jarred  |  May 2nd, 2008 at 6:14 pm

    Hi Rob. For some reason my category filter is not working. I have it set to exclude a category of posts from showing up, but they still do? If possible, shoot me an email instead of responding here and I can provide more detail?


  • 25. Jarred  |  May 2nd, 2008 at 6:18 pm

    Scratch that, I’m not even using your plug-in for this, haha! Love Similar Posts and Recent Posts, though. :)

  • 26. david  |  May 8th, 2008 at 7:12 am

    Any chance you can provide some insight for me? I want comments from a specific category page to be posted on the main page in the main body. I have a middle column where I want this to pull, but I can’t seem to get it to pull. Thanks!

  • 27. ClappingTrees  |  May 12th, 2008 at 11:15 am

    Hi! For some reason, my Recent Comments are not showing up at all. Can help me please?


  • 28. ClappingTrees  |  May 12th, 2008 at 11:20 am

    Hey! It’s okay now. :-p

  • 29. Rob  |  May 12th, 2008 at 1:47 pm

    Clapping Trees: I’m glad you solved your problem.

  • 30. Jarred  |  May 15th, 2008 at 3:33 pm

    Hi Rob,

    NOW I am using your recent comments plugin (haha) and think it’s great.

    A suggestion: I use the group by post function. Is there a way in the next update to have it so that the post with the most recent comment (and all recent comments within the restrictions of the output number) show up on top. Right now, the most recent post with a recent comment within the output restriction shows up first… but that means that the newest comments may not get noticed because they appear midway in the list of posts.

    Does that make sense?

  • 31. Rob  |  May 16th, 2008 at 3:48 pm

    Jarred: You make perfect sense–you want comments grouped by post but sorted by the date of the most recent comment in each group. But not very straightforward to implement… it has joined the list but don’t expect a quick turnaround.

  • 32. Nick Mouratidis  |  May 17th, 2008 at 2:21 am

    Thanks for the wonderful plugin!

    One question though….
    Is there a way so Recent Comments displays the i.e. the 5 more recent comments but only one comment per post?
    I have the plugin on my blog showing my 5 most recent comments but I hate it that all of them are from the same post. I want only the latest comment from each most recently commented post.

    I hope you got what I mean. My english are not so good.

    Is there a way to do that?


  • 33. Rob  |  May 17th, 2008 at 3:12 pm

    Nick: There is an easy way if you don’t mind editing the plugin code. In recent-comments.php find the line:

    $sql .= " ORDER BY comment_date DESC LIMIT $limit";

    and change it to:

    $sql .= " GROUP BY ID ORDER BY comment_date DESC LIMIT $limit";

    Good luck!

  • 34. MhawSayar  |  May 18th, 2008 at 8:23 am

    Thank you so much for great plugin!

  • 35. Sansnom  |  May 19th, 2008 at 12:11 pm


    The plugin works like a charm but links generated go to comments.php. How to make links go to comments_popup.php ? How to make links of recent comments open the comments popup ? Thanks in advance for light,


  • 36. Rob  |  May 19th, 2008 at 3:27 pm

    Sansnom: I’ll see if I can take care of that for you …

  • 37. Rob  |  May 19th, 2008 at 4:48 pm

    Sansnom: The new version ( of the Post-Plugin Library has a new tag, {commentpopupurl}, which can be used to construct links that open up the comment popup window. Let me know if it works for you.

  • 38. Sansnom  |  May 19th, 2008 at 5:48 pm


    1000 thanks for your help. I have tried to upgrade the Post-plugin library but impossible to desactivate the plugin ! I click but it doesn’t desactivate the plugin. So I have upload the new version (called strangly on the dedicate plugin page / I have download the 2503 but when upload admin panel tells it’s the 2502). After the upload done, the plugin is already activate (Because of my problem of desactivation) but in the options of Recent comments plugin there is not the {commentpopupurl}… I’m sorry to have these bad news… 😡 :-)

  • 39. Sansnom  |  May 19th, 2008 at 5:58 pm

    News : I have succeed to upgrade to the 2503 because the admin page tells me it exists an upgrade and automatic upgrade have worked… but the tag doesn’t appear in my recent comments plugin… Still looking :)

  • 40. Rob  |  May 19th, 2008 at 6:03 pm

    Sansnom: You can still use it… I just forgot to add it to the list of available tags.

  • 41. Sansnom  |  May 19th, 2008 at 6:20 pm

    ok :-)) ! Thanks for everything. It’s perfect now for me !!!

  • 42. Sansnom  |  May 19th, 2008 at 6:32 pm

    Me again… 😡 Sorry !

    Now the link open the right popup but… not in front of the right comment. With commenturl you are sent to the right comment under the right post, with commentpopupurl you are sent only to the right post. When there is lot of comments, it’s difficult… I tell this but perhaps I haven’t done the right thing…


  • 43. Rob  |  May 19th, 2008 at 10:15 pm

    Sansnom: I wondered about that myself. I have never used the comments popup before so I don’t know how it should behave — I just took the code of the WordPress template tag comments_popup_link as a guide. I couldn’t see a way to jump to the correct comment. How does the popup usually behave?

  • 44. Sansnom  |  May 19th, 2008 at 11:40 pm

    In fact, it’s a matter of comment-ID. When I use your commenturl, the url made is like that :, when I use your commentpopupurl, it’s like that : where 123 is the post-ID. In WP, it’s the natural behaviour of the popupup because when you call it usually, you never call a comment in particular. But here, we need to target a specific comment but to make it appear in a popup… and I don’t know how because I can’t find on internet an example of link with these 2 parameters…. F^%£ :(

  • 45. Sansnom  |  May 19th, 2008 at 11:45 pm

    Perhaps It would be better to use comment_popup_script ( with the classic url ( where 11130 is the comment-ID), but I don’t know how to code this. I stay searching.

  • 46. Sansnom  |  May 20th, 2008 at 12:48 am

    This kind of link works : “” if we put in the comments_popup.php template just after foreach ($comments as $comment) this : <a name="comment-<?php comment_ID() ?>" id="comment-<?php comment_ID() ?>"></a>,. The last problem is the automatic generation of this link. :)

  • 47. Rob  |  May 20th, 2008 at 10:14 am

    Sansnom: That sounds good; I’ll implement it.

  • 48. Rob  |  May 20th, 2008 at 11:39 am

    Sansnom: OK. There’s a new version coming which will jump to the correct comment in the popup window as long as the theme correctly labels the comments: the default theme does; I had to edit Blix to work.

    Thanks for the investigative work.

  • 49. Sansnom  |  May 20th, 2008 at 1:55 pm

    It works like Terminator now ! 😉 Thankx again for your plugin.

  • 50. Richard  |  May 23rd, 2008 at 5:07 pm

    (originally posted against ‘Configuring the Post Plugins’ by mistake) Sorry!
    need to show comments for PRIVATE posts (not password protected) but This won’t work.

    I checked ‘general settings>>show password protected posts’ but nothing is showing, unless I uncheck the PRIVATE setting on a post. I noticed that when all posts in a a category are checked as private, the category won’t even show in the include/exclude category list in the plugin config pages .

    Using wp-2.5.1and latest download of plugin here

    Any help much appreciated. Thanks.

  • 51. Rob  |  May 23rd, 2008 at 9:27 pm

    Richard: I’m afraid the plugins don’t handle private posts but I’ll investigate whether it would take much work to get them doing so.

  • 52. Richard  |  May 23rd, 2008 at 9:38 pm

    Thanks for that comment Rob. You maybe wondering why I want to make private posts commentable? It’s in conjunction with the ‘Private Plus plugin that grants any registered/ logged in user the right to view any post marked ‘Private’ So we can mark posts private to creat a ‘members section’ for registered userrs.

    I’ll keep subscribed to this thread in case you see a work around for this. Thanks again… Richard

  • 53. plywoodindonesia  |  May 27th, 2008 at 9:59 am

    There’s a new version coming which will jump to the correct comment in the popup window as long as the theme correctly labels the comments

  • 54. Richard  |  June 1st, 2008 at 10:08 am

    Is it possible to display ALL site comments in on a dedicated page? Or display all comments from a particular category on a page? Im thinking that if this was possible, we could display in effect a stream of conversations that users could browse and then click to visit in order to continue their own comments. A bit like a forum showing all posts on the forum, in a certain category, or section. Comments and forum conversations are very similar so this might be a useful feature. Any ideas Rob?


  • 55. Rob  |  June 1st, 2008 at 11:03 am

    Richard: One ‘hacky’ way of doing it would be simply to specify a very large number for the number of comments to show (limit). If you get some mileage out of your idea it would be easy enough to add a ‘show all’ option. I’ll be interested to see how it works out.

  • 56. Richard  |  June 1st, 2008 at 11:47 am

    Ok, her’s my starter.

    1- Created a new page template called comments-full.php
    2- inserted <?php recent_comments(); ?> in the page
    3- created a new page called comments using that new template
    4- All comments are show in the page as desired.

    I am already using the comments in the side panel and using some restricted options, such as limiting the comments to 5 items only. In the comments-full.php page, I want to specify a new set of variable that won’t affect my sidebar comments settings. Such as adding {author} {commenter} {categorynames} {date} {excerpt} {gravatar}

    How would I do that?

  • 57. Rob  |  June 1st, 2008 at 3:30 pm

    Richard: You can specify a parameter string, e.g.,

    <?php recent_comments('limit=9999&output_template={author} {commenter} {categorynames} {date} {excerpt} {gravatar}'); ?>

  • 58. Richard  |  June 1st, 2008 at 4:52 pm

    Kind of thought that might be the case … Thnaks, I’ll give this a try.

  • 59. 2mk  |  June 2nd, 2008 at 9:22 am

    I’ve got this error

    Fatal error: Call to undefined function where_just_post() in /home/ismart/public_html/ on line 99

  • 60. Rob  |  June 2nd, 2008 at 10:23 am

    2mk: You need to download the latest version of the Post-Plugin Library too.

  • 61. chris  |  June 3rd, 2008 at 7:14 pm

    Just did the lastest up not 1 hr ago and now get this error when trying to loginto the admin panel

    Fatal error: Call to undefined function ppl_plugin_basename() in /home/bananabe/public_html/wp-content/plugins/recent-comments-plugin/recent-comments-admin.php on line 244

  • 62. chris  |  June 3rd, 2008 at 7:38 pm

    line 244 of the code has the error in it on the latest update, changed it to the previous version to read:
    add_action(‘activate_’.str_replace(‘-admin’, ”, plugin_basename(__FILE__)), ‘recent_comments_install’);

    and it worked

  • 63. Rob  |  June 3rd, 2008 at 9:19 pm

    chris: Are you sure you got the latest version ( of the Post-Plugin Library? It provides the function ppl_plugin_basename which handles earlier versions of WP having problems with windows servers.

  • 64. chris  |  June 3rd, 2008 at 10:24 pm

    I just did the upgrade to on another wp 2.5.1 install and got this:

    Plugin failed to reactivate due to a fatal error.

    Fatal error: Call to undefined function ppl_plugin_basename() in /home/bananabe/public_html/chrisneaves/wp-content/plugins/recent-comments-plugin/recent-comments-admin.php on line 244

    And of course taking out the ppl_ alllowed the plugin to work again and no fatal error.

    But from experiments here it all goes mad if the post plugin library is not installed first, as happened when you use the plugin central plugin to upload the updates

  • 65. Rob  |  June 4th, 2008 at 1:00 am

    Version fixes, I hope, the ppl_plugin_basename problem. Don’t forget to get Post-PLugin Library too.

  • 66. Rob  |  June 4th, 2008 at 10:41 am

    If you had the misfortune to download version you may run into problems when you try to update to a newer version. I managed to introduce a circular dependence between this plugin and the Post-Plugin Library which means trying to update either from the admin plugins page will cause an error. Instead you need to delete the version from the server (Post-Plugin LIbrary too) and upload the newer one and the problem should be solved. I apologise for any worry or inconvenience.

  • 67. steve  |  June 6th, 2008 at 10:29 pm

    I am working on a site on wp v2.3.2. When I install them I cant acitvate the post-plugin librairy without getting a fatal error. and when I install and activate recent comments all the admin screens return blank. If I delete these two plugins, everything returns to normal. Any thoughts on what I should try.

  • 68. Rob  |  June 7th, 2008 at 9:52 am

    steve: Are you sure you have the latest ( versions? was causing some issues.

    Can you let me know some details about your server setup? Windows/Linux, versions of PHP, MySQL, etc.?

    Meanwhile I’ll try installing here on a clean WP2.3.2 and see what happens.

  • 69. gary  |  June 24th, 2008 at 4:18 am

    hello Rob, I’d like to give you a heads up re what seems to be a recurring problem with my recent update to for both recent comments and post plugin.

    Directly after upgrading, all my recent comments on the index page disappear. My settings are:

    posts to show: 10
    posts to skip: 0
    show password protected: yes
    show static pages: both pages and posts
    display posts that are: (all no)
    ignore posts: (no date)
    omit current post: no
    show just current post: no
    match the current posts category: no
    match the current posts tags: no
    match the current posts author: no
    type of comment to show: all kinds of comments
    omit comments by author: no
    omit comments by registered users: no

    I have two 2.5.1 wp blogs. On the 1st blog, all comments disappeared, but suddenly reappeared after a few days.

    On this 2nd blog, I just updated all plugins and again, all comments disappeared. I’m waiting for them to reappear again, but I’ve decided to write you about it as well.

    Does it cache somewhere first? I’ve tried uploading, deleting, uploading again, logging in and out, to no avail. Any help you can extend would be great.

    many thanks!

  • 70. Rob  |  June 24th, 2008 at 9:50 am

    gary: The problem is that your setting tell the plugin not to display anything! You need to change ‘display posts that are’ to be yes for at least published.

    If you when you update the plugins you make sure they get deactivated and reactivated any new default values get added–this one would have set to display published posts.

    Good luck!

  • 71. gary  |  June 24th, 2008 at 2:25 pm

    @Rob oh my gosh you’re right. LOL. As usual, an oversight on my part. Thank you!

  • 72. Marc  |  June 26th, 2008 at 2:15 pm

    Hi Rob, thanks for this wonderful plugin. Just installed it and for some reason the output links on the homepage look like http://domain/.html#comment-3 which leads to 404 errors. In all other pages the output link is correct (http://domain/post-name.html#comment-3)

    My output template is {commentexcerpt} {commentlink}

    I’m using WP 2.3. Hope you can help!

  • 73. Rob  |  June 27th, 2008 at 10:35 am

    Marc: I’ll investigate!

  • 74. Rob  |  June 27th, 2008 at 10:44 am

    Marc: How do you set up your homepage?

  • 75. kaneesha  |  June 29th, 2008 at 2:42 am


    is it possible to show category specific comments?

    for example in archive.php:

    and it shows now only those specific comments from the displayed category like :

    http://myblog/wordpress/category/one/ = shows now only the comments which are in category “one”.

    http://myblog/wordpress/category/two/ = shows now only the comments which are in category “two”.


    thanks for any help.


  • 76. Marc  |  June 30th, 2008 at 9:29 am

    Hi Rob, thanks for getting back, not sure to get what you mean. If you refer to homepage widgets, the sidebar widgets are as follows :

    1- Sensitive tag cloud
    2- Categories
    3- Recent comments (yours)
    4- Links

    Also, my permalink structure is :

  • 77. Marc  |  June 30th, 2008 at 5:38 pm

    Rob : update : got the same issue if I use {link} instead of {commentlink} in the output setup. I also tried upgrading to the latest version of the library and the plugin, it didn’t fix the problem.

  • 78. Rob  |  June 30th, 2008 at 5:46 pm

    kaneesha: If I understand you correctly then I think you can do what you ask but it’s success will depend on whether your categories are ‘flat’ or ‘hierarchical’ or ‘tag-like’.

    I suggest that you use the sorting facility on the plugin’s output settings screen. Sort the comments by {categoryid} and choose something like {categorylinks} as the group template. If you want to exclude some categories you can do that from the filter screen. Play around and see if you can get the output you want.

  • 79. Rob  |  June 30th, 2008 at 6:26 pm

    Marc: I was meaning whether your homepage showed the usual list of recent posts or was a static page.

    I was wondering if the problem is with your permalink structure but that still doesn’t explain why the permalink for a comment should be getting the permalink for the homepage…

    The {commentlink} tag doesn’t really do much beyond calling WordPress’ get_permalink() function to do all the work. So either there is something screwy with the permalinks or for some reason the plugin isn’t picking up the correct post IDs. But if it were getting bad IDs I would expect the {commentexcerpt} to be bad also.

    I am puzzled.

  • 80. kaneesha  |  June 30th, 2008 at 6:38 pm

    thanks rob, i’ll give this a try

  • 81. Marc  |  July 1st, 2008 at 9:25 am

    Rob: thanks for the details, will let you know if I manage to fix this. (yes, the homepage shows the usual list of recent posts).

  • 82. Peng  |  July 2nd, 2008 at 8:12 pm

    Hi Rob,

    Your plugins are excellently thought out and written. I just started using your set of plugins and am impressed by the quality of the code.

  • 83. Rob  |  July 2nd, 2008 at 9:22 pm

    Peng: Thank you very much!

  • 84. Lise  |  July 3rd, 2008 at 9:35 pm


    Waiting for the .pot file to translate the plugin 😉 I wrote a little documentation in French about Recent Comment

  • 85. Rob  |  July 4th, 2008 at 10:42 am

    Lise: Thank you for your translation/tutorial!

    I am sending you a .pot file by email for you to have a look at. I am not sure my code is properly set up for translation so maybe you could give me your opinion?

  • 86. Vladimir  |  July 22nd, 2008 at 11:42 pm

    is it available as a widget?

  • 87. James  |  July 26th, 2008 at 9:20 am

    Just had a pretty spectacular bug which looks to have been the work of Recent Comments, I thought I should give you a heads up. I can’t provide any debug info as I had to get it off the server.

    Had been in use for a long time without issue, but for no apparent reason (and in response to no user action) for the last couple of days it would start some kind of crazed mysql DB access routine which lasted several hours each day, overloading the server with huge numbers of manipulations of the taxonomy and relationships tables for all the posts.

    During this period the server would slow to a crawl under what looked to have been dozens of queries a second. The entire DB is only a few mb so I think it must have got looped into something, as it could have done anything to the entire DB a thousand times over with all that CPU time?

    I may have time to test and reinstall later, so I will try to provide any details then. Was a bit urgent with the server in meltdown.

  • 88. Rob  |  July 26th, 2008 at 12:16 pm

    Vladimir: Yes, it automatically installs a widget.

  • 89. Rob  |  July 26th, 2008 at 12:20 pm

    James: That sounds like an important issue to get to the bottom of!!! Can you let me have whatever evidence you have that makes you think Recent Comments was the culprit? I’d like to find out what’s going on and fix any possible problems.

  • 90. Nasir Mahmood  |  July 26th, 2008 at 3:22 pm

    Does this plug in work on its own or only for blog powered sites? I want my visitors to be able to leave comments about particular articles on my site. I’m currently using a forum from SMF.

  • 91. Nasir Mahmood  |  July 26th, 2008 at 3:27 pm

    Also, does it work for Joomla type sites. I used Joomla tp create a site but again I want users to be able to leave comments about the articles that can be read by following a link. for example “”Decent Homes”” xx comments, by xx users

  • 92. Rob  |  July 26th, 2008 at 8:22 pm

    Nasir: This is a WordPress plugin only.

  • 93. James  |  July 27th, 2008 at 1:28 am

    I did the trial and error plugin deactivation, and the load only subsided on recent comments going away. Without it on it has not recoccurred. As it was causing havoc on a production site, I’m afraid I didn’t test it too thoroughly. Also, I think only WP itself and RC have any reason to be accessing those tables, of the plugins on there.

    It would persist even when restarting the server, and it was tearing through the entire DB (only 5mb) for hours using all the CPU on the server. Somebody with the hosting company suggested it might be something cronned, given the reoccurence, but it was definitely coming from within WP (using the WP only account), and turning off RC put a quick stop to it. Traffic on the site was only normal (several hundred visits an hour), and it is at any rate WP-Cached.

    As I can’t mess around too much on the site there is a limit to what I can present – my apologies.

    I have changed around the PHP on the server substantially, so I will brave it again when I can watch over it… I’ll report back if it continues or abates.

  • 94. Kestrel  |  August 1st, 2008 at 11:33 pm

    Wonderful plugin! Just a couple feature requests, if I may: The option to use a default gravatar if the commenter doesn’t have one, and the option to resize gravatars.

    Once again, outstanding work!

  • 95. Kestrel  |  August 1st, 2008 at 11:35 pm

    Oops…and one more thing (perhaps I haven’t found it yet): When grouping by post, be able to limit the number of comments shown per post. (E.g., 15 comments max, no more than 5 per post.)

  • 96. Rob  |  August 2nd, 2008 at 10:06 am

    Kestrel: The gravatar output template tag already handles the cases you mention. The documentation says:

    {gravatar:size:rating:default} : Displays a globally recognised avatar based on the commenter’s email address. By default, size is 96px. The ‘default’ parameter lets you specify the uri of an image to use when the commenter has no gravatar. Alternatively, you can specify ‘wavatar’, ‘monsterid’, or ‘identicon’ to have an individualised image returned as default.

    I’m afraid your second request — limiting by post — has proved much harder to implement–the query gets quite rococo–and is shelved for the moment.

  • 97. Kestrel  |  August 2nd, 2008 at 5:33 pm

    Thanks Rob :) Actually, I was able to go into the code itself and do the same thing option does. Totally missed the options when I was looking there; all I saw was {gravatar} — my bad!

    I don’t know if it’s any help, but Get Recent Comments plugin lists x comments for n posts; I wasn’t real happy with how it worked in my new theme, which is how I found yours.

    Thanks for the quick response!

  • 98. Rob  |  August 3rd, 2008 at 10:48 am

    Kestrel: Thanks for the information.

  • 99. Erum  |  August 6th, 2008 at 12:01 pm

    Really great plugin!! Thanks

    A feature request:
    I have installed a plugin called KeywordLuv. It lets you enter your name as YourName@YourKeywordsHere and then displays it as

    YourName From YourKeywordsHere with YourKeywordsHere as the main link.

    Now most of my commenters are using this format. However, you can imagine what it looks like in my recent comments widget in the sidebar.

    Will be great if you can incorporate the same in your plugin. Lots of people have started to use the Keyword Luv plugin and will be happy to have this option in your plugin as well. Thanks!

  • 100. Rob  |  August 6th, 2008 at 3:43 pm

    Erum: I will include a call to the right filter in the next release. If you want to make the change right away you will need to edit output_tags.php in the post-plugin-library. The last line of the function otf_commenterlink needs changing from

    return $value;


    return apply_filters('get_comment_author_link', $value);

    After the edit the {commenterlink} output tag will show a link to the comment author properly filtered.

  • 101. Erum  |  August 6th, 2008 at 7:47 pm

    Thanks! That worked like a charm!

  • 102. Richard  |  August 12th, 2008 at 7:00 pm

    Is it possible to show top commenters with this plugin, based on highest commenters overall, or by post. Thanks.

  • 103. jack  |  August 13th, 2008 at 12:12 pm

    Hmmm, my previous reply has been rejected somewhere I think..

    My question was how can the plugin (widget) be used to also display comments on future posts. That does sound strange, but I’ve made a site for a festival, and all events (which are regular – and published – posts but with future dates, the date of the actual event) are published immediately by the use of a wordpress plugin (called ‘the future is now’).

    People are leaving replies to upcoming events, but the widget doesn’t show them.

  • 104. Rob  |  August 13th, 2008 at 2:58 pm

    Richard: Sorry but that’s outside the range of Recent Comments. It might be a good idea for me to whip up a plugin that will though. I’ll put it on the ‘to do’ list but don’t hold your breath!

  • 105. Rob  |  August 13th, 2008 at 3:11 pm

    jack: Have you tried setting Recent Comments to show future posts? I’m not sure it will do what you want but it would be good to check first. Let me know either way.

    It may be possible to see how the plugin you mention works and make some tweaks to Recent Comments if needed, but first things first.

  • 106. Sue  |  August 14th, 2008 at 12:15 am

    I have 2 recent comments for a post, but the recent comments plug in is showing it twice.

    I have also submitted this as a bug report.
    thanks in advance,

  • 107. jack  |  August 20th, 2008 at 6:26 pm

    Hello Rob,

    Yes, ‘show future posts’ is checked.
    The site url is:
    and the comments are shown in the sidebar on the right: ‘Recente reacties’.

  • 108. Alfons  |  August 27th, 2008 at 10:35 pm

    Hello Rob,

    Thanks a lot for your nice plugin!
    Is there a way to show a title of the post with the recent comment in the \”Recent Comments\”-list just once? Even if all last recent comments are made at just one article?

    Basically I created a list which shows the title and excerpt of the posts with the latest comments, but if people just commenting on one particular article the list looks like there is something wrong, coz the content is there several times.

    Thanks for your help

  • 109. Rob  |  August 29th, 2008 at 9:46 am

    Alfons: If I understand you correctly you should be able to set up the post title (etc.) in the group output template and keep the comment details in the output template — and group the output by post.

  • 110. Alfons  |  August 29th, 2008 at 7:45 pm

    Thanks a lot. Works fine now.

  • 111. Rashed  |  September 7th, 2008 at 8:06 pm

    Hi, thanks a lot this plugin. Its gonna help to buld up mu site\’s users profile pages.

    Just one question! Where should I put the condition ‘is_single()’?

  • 112. Rob  |  September 8th, 2008 at 12:36 pm

    Rashed: The ‘is_single()’ condition is used with the plugin widget to get the widget to only show on single post pages. I am not sure how you are trying to use the widget on user profile pages.

  • 113. Rashed  |  September 9th, 2008 at 1:20 am

    Thanks again for the reply.

    Ya! I\’m trying to find it out. :(

  • 114. Arshad  |  September 10th, 2008 at 10:16 pm

    I am using the plugin and not the widget since i wanted to display them in a box and i was able to achieve it using divs in the stylesheet. However i want this to be shown only on the home page. I tried adding tag..but only after the


    So the format is:

    I am still trying to learn wordpress so any help here will be appreciated. :(

  • 115. Arshad  |  September 10th, 2008 at 10:20 pm

    ohh..i think the php codes are not supported…i used the is_home tag before adding the recent_comments tag :)

  • 116. Rob  |  September 10th, 2008 at 11:12 pm

    Arshad: You could try is_front_page():

    if (is_front_page()) recent_comments();

  • 117. Arshad  |  September 10th, 2008 at 11:28 pm it right now :).One final it possible to style the box if i use widget instead of plugin…or can u tell me how can i display a title (something like Recent Comments) if i use the plugin? I tried it in the placement page under Output after post parameter but its not displaying

  • 118. Rob  |  September 11th, 2008 at 5:41 pm

    Arshad: There are two ways to display a title if you use the plugin: you can stick a title in the HTML before the plugin call or you can include a title in the prefix codes (from the output submenu).

  • 119. Robert  |  September 16th, 2008 at 10:21 pm

    I\’m using the plugin on my site and I was wondering if there is a way to only show the most recent comment per post rather than all in a series.

    Say I have 10 comments and 4 of them are on the same post. The way it currently works, it shows them in a time based list or grouped together by post. What I want is only the latest comment per post to show up since the other 3 only pollute the recent comment area.

    I saw another plugin that \”capped\” per post how many posts were allowed to show up in the most recent widget. Can this be accomplished as is or is this an upgrade needed to be added to the current plugin?

    Basically this would return a forum style listing.

  • 120. Rob  |  September 17th, 2008 at 11:23 am

    Robert: Recent Comments can’t do that at the moment but so many people request it that I really ought to take another look. It’s would be a messy addition to the code of Recent Comments and might require a plugin all of its own. Let me think…

  • 121. Rob  |  September 17th, 2008 at 4:05 pm

    Robert: Sometimes things are surprisingly easy! The next release of Recent Comments (later today if I can manage it) includes the option to restrict the output to one comment per post.

  • 122. Robert  |  September 18th, 2008 at 4:11 pm

    Rob, thanks for the quick update, I do appreciate it. The unique feature works great and is exactly what I was looking for. However, it seems to pick the first comment per post as the display and not the last (most recent). Is this a sorting issue I can fix within the current structure or is it tied to the unique call in the plugin itself?

  • 123. Robert  |  September 18th, 2008 at 5:00 pm

    Rob, as additional information on that last issue. It appears that the {commenter} is affected as the {commentdate} and {commenttime} are both correct for the most recent comment. So {commenter} appears to be pulling the name of the first comment per post and not the most recent. Hope that helps.

  • 124. Rob  |  September 19th, 2008 at 2:25 pm

    Robert: I should have known it couldn’t be as easy as that! After a morning of fiddling about I think I have it right and I am sending you an update by email to check out.

  • 125. Robert  |  September 19th, 2008 at 6:04 pm

    Rob, Thanks for the help and additions to the plugin. The emailed version seems to have done the trick.

    Keep up the great work!

  • 126. Printer  |  September 30th, 2008 at 10:32 pm

    Hi Rob,
    I have a question about placing a second recent_comments list in the sidebar. I have made a list for one category so tha people only see the comments on that category. Now I want to place a “normal” comments list in te sidebar that shows all the comments on the homepage and other pages/cat excluding the comments from the category from the first list (am I clear :):)
    I have placed this in a php widget <?php if (function_exists('recent_comments')) recent_comments(limit=9&match_cat=false&excluded_cats=16&included_cats=10,15,1,14,4,3,8); ?> But for some reason the list is not showing. Is there something I have done wrong here in the code? It needs to override the option settings.

  • 127. Printer  |  September 30th, 2008 at 10:35 pm

    oh there seems to go something wrong with placing my code the last part was”&included_cats=10,15 etc); ?>”

  • 128. Rob  |  October 1st, 2008 at 10:42 am

    Printer: Could it be as simple as the fact that the parameter to recent_comments should be in quotes? The mistake may just be an artefact of posting the comment so let me know.

  • 129. Dan  |  October 1st, 2008 at 2:25 pm

    Two questions — one on filtering and the other on sorting.

    1. Is there a way to display recent comments only after they’ve met specific conditionals? I’d like to display the first line of a comment only if that comment starts with a specific term. e.g. if I specify the term to be “time” then the comment has “time 3:47” in first line of the comment then it would allow “3:47” to be displayed.

    2. I’m trying to create a scoreboard, so I’m interested in being able to sort the list in both ascending and descending order. Anyone know how I might tackle this?

  • 130. Printer  |  October 1st, 2008 at 6:22 pm

    Rob: Ah, yes.. of course. :) Thanks so mutch!

  • 131. Rob  |  October 4th, 2008 at 10:56 am

    Dan: There’s a new feature in the next release which allows the output to be filtered according to content so you would be able to select only the ‘time’ comments. The {php} output tag might help you select the parts of the comment you need.

    If you wanted to then sort on the time you could conceivably do it — there is the option to sort by an output template tag.

    All that said I suspect you would be better with a custom solution that better targets your specific aims.

  • 132. noRm  |  October 7th, 2008 at 9:03 pm

    Hey, thank for this great plugin!

    I have a question, too:
    Is it possible that the plugin displays three points (“…”) after the [commentsnippet] if it’s longer than the whole comment?

  • 133. Don  |  October 8th, 2008 at 4:35 pm

    Hey Rob, will that change you sent Robert be in the next general release? I see that you’re using GROUP BY when you return only one record per post but MySQL (at least in v5.0) says this about the items from a group-by that aren’t part of the group-by.

    Do not use this feature if the columns you omit from the GROUP BY part are not constant in the group. The server is free to return any value from the group, so the results are indeterminate unless all values are the same.

    So not only might we see something like the wrong commenter (I’m having the same issue as Robert) but in theory the server MIGHT return values from DIFFERENT records, mixing commenter and comment!

  • 134. noRm  |  October 8th, 2008 at 6:56 pm

    Ok, i have found out the ‘method’-paramater. But {commentsnippet:130:trim} does’t work for me for example. It doesn’t add an ‘…’ . What I’m doing wrong?

  • 135. noRm  |  October 8th, 2008 at 7:07 pm

    Ha, I got it! {commentsnippet:130:b:…} works. Sry for spamming. 😉

  • 136. MP  |  October 22nd, 2008 at 12:28 pm

    Is it possible to have “{commentcount}” to show up as a link? Thank you.

  • 137. Zane  |  October 22nd, 2008 at 4:44 pm

    Hi, I wanna thank you for your suite of plugins you have developed. They are all working great except for recent comments. I am getting an error in WordPress when I try to access the plugin’s configuration (Cannot load recent-comments.php.). The actual file “recent-comments.php” displays an error “Fatal error: Call to undefined function get_option() in /****/****/****/****/wp-content/plugins/recent-comments-plugin/recent-comments.php on line 175” and in “recent-comments-admin.php” displays an error “Fatal error: Call to undefined function add_action() in /****/****/****/****/wp-content/plugins/recent-comments-plugin/recent-comments-admin.php on line 9”. I was wondering if you knew what the issue I am having is.


  • 138. inlookout  |  October 23rd, 2008 at 9:04 am

    Having some trouble here. :(

    I am using recent comments to dynamically build callouts in my posts to show the most recent comment for that particular post.

    It works but it never shows the most recent comment. Here’s the link:

    I want it to show the last comment posted. I’ve messed with the grouping but nothing ever changes it. It always shows the third comment received in this case.

    Any advice would be helpful.

  • 139. David  |  November 22nd, 2008 at 10:01 pm

    Found a bug:

    If you allow anonymous comments (those where all fields are left blank), Recent Comments doesn’t correctly fill in “Anonymous” in place of nothing. As a result it breaks the display (grammatically) and you end up with “commented on” instead of “Anonymous commented on”.

    It sounds simple enough, I wonder if a fix would be possible?

  • 140. stare gry  |  November 25th, 2008 at 12:49 pm

    The unique feature works great and is exactly what I was looking for. However, it seems to pick the first comment per post as the display and not the last (most recent). Is this a sorting issue I can fix within the current structure or is it tied to the unique call in the plugin itself

  • 141. tbronson  |  December 2nd, 2008 at 12:33 am

    How can if filter out my own comments, when I am the original WP admin account?

    Excluding author doesn’t seem to work. When I selected exclude author “admin”, no comments were displayed, i.e. “none found”. I removed the admin exclusion and tried excluding a random other author on the list and the display was fine.

    From this, I’m assuming there’s something different about the way the original admin account is filtered?

    Thanks! (Your plugins are great!!!)

  • 142. Dana  |  December 5th, 2008 at 6:25 pm

    I’ve also experienced the massive load problems that James described. Setting recent comments to display the last 5, only if they’ve been in the last 7 days and it hammers my server. The blog has more than 16,000 comments. Could that be the culprit? I have submitted a bug report, please feel free to contact me for more information.

  • 143. Video  |  December 12th, 2008 at 10:54 am

    My site was going down, after the installation :(
    i musst restore it :(

  • 144. Julesfrog  |  December 15th, 2008 at 9:42 pm


    I am trying to create a new output_tag to return the value of a new filed I created above the comments text area. The new field’s variable is “recipe_name”. I tried to duplicate the otf_postid function and wrote this:

    function otf_recipe_name ($option_key, $result, $ext) {
    return $result->recipe_name;

    But it didn’t work. Can someone help?

  • 145. Arman  |  December 29th, 2008 at 12:53 am

    Hello Rob,
    I am new with the WP architecture and I am trying to make some changes on an existing blog site. The site is using your Recent_Comment module which works perfectly.

    However, there are some new requirements and I am not sure if they are already built in to the current structure. I don’t want to reinvent the wheel if you know what I mean … :-)

    Here are the new requirements:
    1. when someone goes to the Authors page, I need to display the posts and comments made by that Author only. The post part is simple, but I am not sure how I can use the existing recent_comments framework to pull the comments made by only that author. Is there any special parameter that I can pass into the recent_comment() function to make it happen?

    2. Is there any way to pull the recent comments with a dynamic/run-time date range settings so that the user can specify the date range?

    I understand that in order to make this happen the Where clause in the sql query needs to be changed, I wonder if there is a way to pass in the where clause in the run time?

    Thank you in advance for all your help.

  • 146. اس ام اس پیامک عید نوروز  |  December 30th, 2008 at 8:21 am

    Merry Chrismas and happy new year for team & everyone!
    New year new

  • 147. okna pcv  |  January 6th, 2009 at 7:52 pm

    It,s very intersesting

  • 148. film izle  |  January 12th, 2009 at 5:22 pm

    I’m not sure I know enough to respond in any useful way. Does this link have any relevant suggestions?

  • 149. HotForWords  |  February 13th, 2009 at 12:36 pm

    Is there anyway you can make your plugin work with paged comments in 2.7? Everything else works perfectly in 2.7 except for that. I think it’s a new variable they introduced in 2.7 that adds a comment-page-# into the url.



  • 150. Drupal Web Developer  |  March 14th, 2009 at 9:30 am

    Very nice information. Thanks for this. By the way, did you create this layout yourself?

  • 151. charger  |  March 14th, 2009 at 12:25 pm

    Great ths, save my time a lot

  • 152. Drupal Web Development  |  March 14th, 2009 at 12:29 pm

    Nice writing style. Looking forward to reading more from you.

  • 153. jfwong  |  March 23rd, 2009 at 9:41 am

    Dear Sir:

    I tried to test this plugin and found a strange result : I always get the oldest comment for each post.
    ( just plugin and put on )

    Is there something wrong in my setting ?
    Thanks !

  • 154.  |  March 24th, 2009 at 6:49 am

    Nice writing style. Looking forward to reading more from you.

  • 155. tbronson  |  April 4th, 2009 at 3:54 am

    Is there an easy way to paginate Recent Comments output?

    I’m using RC to list of ALL comments on a WP page.

    The number of comments has gotten to the point where trying to place them all on a single page exceeds available PHP memory.


  • 156. Hammer  |  April 9th, 2009 at 11:20 am

    Hi Rob,

    Excluding categories in recent comments does not work for me on 2.7. I am using the latest version. Does it require latest version of the Post-Plugin Library. Do clarify.


  • 157. kalpde  |  April 11th, 2009 at 2:05 pm

    ThankS plinGs

  • 158. Annie Ted  |  April 22nd, 2009 at 9:32 am

    Hi Rob,

    Thanks for this post. We are new to this and created a blog using wordpress

  • 159. Paul  |  April 23rd, 2009 at 7:46 pm

    How about a “Random Comments” plugin? Or how hard would it be for me to convert “Recent Comments” into “Random Comments”?

  • 160. Jermaine\'s Work From Home Blog  |  April 25th, 2009 at 1:56 am

    The recent comments widget is so awesome. I don’t really understand why this has never been thought up before. Using the recent comments widget can also help you monitor your visitors. most of the time it gives you a good idea. I like these instructions provided, really nice of you to post them.

  • 161. Rockwell Sonicrafter  |  April 27th, 2009 at 3:30 pm

    I debated a couple of years about purchasing a tool like this. At first, Fein was the only option and just for home use it was too much money for me to justify purchasing. Now that there are reasonably priced choices, I purchased the 37 piece Rockwell kit and added some accessories. Honestly, I felt like it was a gamble. Many reviews say the blades don’t last and they come loose all the time. I rolled the dice. I WON!!!

  • 162. EIP  |  June 3rd, 2009 at 4:42 pm

    This is wonderful. Thank you so much!

  • 163. George Serradinho  |  June 4th, 2009 at 7:00 am

    Wow, this is a cool plugin.

    I already have your random and popular posts plugin installed on my site and they are just awesome. I think this plugin could also fit into my site as the normal recent comments of WP is dull and boring.

  • 164. reem  |  June 6th, 2009 at 12:58 am

    hey,nice plugin but how can i show avatars with recent comments ?

  • 165. sam  |  June 19th, 2009 at 7:07 am

    Hi, how do I add “recent comments” into a particular page? I would like to insert it into one specific page (and not a template if that’s possible).

    – thanks


  • 166. Boston SEO  |  July 2nd, 2009 at 3:04 pm

    What great, responsive help! Keep up the good work.

  • 167. Love poems & Love Quotes  |  July 4th, 2009 at 5:17 pm

    The recent comment plugin was been the pinnacle of blogging in 2007. 2.6 was alright at the time, but top commentator is so much better. Nice post, and thanks for the extensions.

  • 168. Missy H  |  August 30th, 2011 at 5:14 pm

    I, too, have the same problem as above, I downloaded the most recent version of this plugin and uploaded it to my plugins dir and it wouldn’t show up in the list of available plugins in order for me to activate it.

    Do you know how to fix this, is anyone else having this same problem? Any help would be greatly appreciated.

    Thank you!