Skip to content

WordPress Recent Comments Plugin / Widget

This plugin will add a list of the most recent comments posted to your blog. They are gathered in descending order (newest at the top), but then grouped by post title, so that comments from the same post are listed together. The list items will be links to the comments, and will contain the name of the commenter.

The following parameters are configurable by the user, either from the widget admin interface or directly (if used as a standalone plugin):

  • Number of comments to show: Total number of comments to display
  • Number of words per comment excerpt: The first N words of the comment will be listed
  • Max comments per post: This option is a “cap” to ensure that multiple posts are included in the list, even if all the recent comments were from a single post.
  • Max letters per word: This option is to deal with long “words” in the comments (specifically raw URLs) that can interfere with the formating of the list, depending on the CSS rules applied.

Download FreePress Recent Comments Widget

Installation:

  1. Extract all files in the archive into your plugins directory. The archive should contain a folder called “freepress”, which should be placed directly under the plugins directory, and all the files distributed with this plugin should be in the “freepress” folder. For example: /var/www/wordpress/wp-content/plugins/freepress/recentCommentsWidget.php
  2. If you are using the widgets plugin, the tagboard will automatically appear as an available widget for your sidebar.
  3. If you prefer to manually add the tagboard to your theme, you can insert the following code wherever you’d like the tagboard to show up:

    <?php
    if(function_exists('fp_get_recent_comments')) {
    echo fp_get_recent_comments(7, 5, 5, 0);
    }
    ?>

    The arguments are in the order described in the list above. In this example, it would show 7 comments total, 5 words from each comment as an excerpt, a maximum of 5 comments from any one post, and no limit on the number of characters per word in the excerpts.

*Note: This version of the plugin has been tested in WordPress 2.x as well as recent versions of WordPress MU. Please let me know by commenting here if you run into any issues.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Comment Feed

99 Responses

  1. Sure; if you see any reference sites that you like the look of you can always view the CSS for those.

    Here is what I use for how it looks on my site:
    li.widget_fp_recentcomments div.recentcommentscontainer {
    display: block;
    color: #191736;
    background-color: #FFF0BD;
    border: #191736 1px dashed;
    overflow: hidden;
    padding: 0px 5px !important;
    }

    li.widget_fp_recentcomments h2.widgettitle {
    font-size: 1.6em !important;
    font-weight: bold;
    font-family: georgia, times new roman,serif;
    color: white;
    margin: 0px 0px 5px 0px;
    }

    li.widget_fp_recentcomments div.recentcommentscontainer h4.recentCommentsPostTitle {
    margin: 2px 0px 2px 0px;
    color: #191736;
    font-size: 1em;
    font-weight: bold;
    }

    li.widget_fp_recentcomments div.recentcommentscontainer h4 a:hover { color:#191736 !important; }

    li.widget_fp_recentcomments div.recentcommentscontainer ul {
    display: block;
    margin: 0px 0px 5px 0px !important;
    padding: 0px 0px 5px 0px !important;
    color: #191736;
    font-size: .85em !important;
    text-decoration: none;
    font-weight: normal !important;
    border-bottom: #AFA37C 1px dashed;
    }

    li.widget_fp_recentcomments div.recentcommentscontainer ul li {
    margin: 2px 0px;
    }

    li.widget_fp_recentcomments div.recentcommentscontainer ul li span.commentAuthor{
    font-weight: bold;
    }

    li.widget_fp_recentcomments div.recentcommentscontainer ul li a:hover {
    color: #191736 !important;
    font-weight: normal !important;
    }

  2. Is there any way to exclude pingbacks from the list of recent comments displayed?

  3. can`t work in wordpress2.1

  4. I love this plugin. But would like to have the updated version for wordpress2.1

    Adult PersonalsJanuary 30, 2007 @ 4:03 am
  5. Love this but is not working in WP2.1. Any possibility of an update?

    KA

  6. When was the last time you downloaded it? I did recently publish an update, and it’s running on this blog, which is WP 2.1.

  7. Is the link above broken for anyone else?

  8. Oops, should be working now.

  9. No the file is corrupted.

  10. No, it’s good. Are you maybe trying to open it as a .zip file rather than .tar.gz?

    Perhaps I should just post it in .zip format to make it easier for more people…

  11. nice blog. i will certainly book mark it. i also have a web site.
    it is

    http://nbbhost.uni.cc

    Regards

  12. Hi -
    Would it be possible to post this as a zip file as you tentatively suggested above?? It is exactly what I’ve been looking for, but I’m afraid I’m not making any headway trying to figure out how to extract files from a .tar.gz ….

    Thanks!!!! – julie

  13. not working for me….when i download it all i get is the php file for the widget no other files as suggested by the instructions….is there a link to download the plugin or just the widget???

  14. The .php file is the only file you need. If you’re using the widgets plugin already (by Automattic) then this plugin should be available in your list of widgets after you activate it.

    If you aren’t using the widgets plugin, see the directions above for using it on its own.

  15. I’m trying to use it on its own…I’ve activated the pluggin and pasted this code in my sidebar:

    but that code is all that shows up…must be missing something

  16. pluggin doesn’t work…just shows code..i’ve enabled the plugin and added the required code and all it shows is that code…what is the problem?????????????????????????????/

    blackxmasMay 15, 2007 @ 2:23 pm
  17. Make sure that the opening PHP tag does not contain a space between the < and the ? as was shown in the example. That was an error in the original post.

  18. Thanx for this plugin;)

  19. How can I display comment author’s name with the link to their website, not just plain text?

  20. Right now it will only show links for registered users, not anonymous commenters.

    I plan to release a new version shortly that does offer that option, but I’d caution against using it due to the potential for abuse.

  21. tnks you

  22. very very good
    happy christmas

  23. I have been looking for this plugin – thank you

« Older Comments



Some HTML is OK

or, reply to this post via trackback.

Continuing the Discussion

  1. [...] Recent Comments Widget СпиÑ?ок поÑ?ледних комментариев. Widget-модуль, наÑ?траиваемый вывод, группировка по Ñ?ообщениÑ?м. [...]

  2. [...] For others that may find it useful, I’ve made two modifications to the FreePress Recent Coments plugin on DLTJ: one to strip out quoted material when using the Quoter plugin and a second to suppress pingback entries that result from links to material within the blog. ¶ [...]

  3. [...] WordPress Recent Comments Plugin / Widget [...]

  4. [...]   Recent Comments Plugin / Widget,最近留言�件,�时支�widget,��设置比较丰富。 comment sidebar [...]

  5. [...] I just installed the WordPress plugin Recent Comments developed by JB and released under the GPL license. Great plugin! Makes it easier to keep an eye on ongoing conversations. [...]

  6. [...] Recent Comments Widget – I’ve actually been rotating several of these, so don’t be confused by the name. I think I’m finally happy with this one, by Jared Bangs and derived from Scott Reilly. What’s special is shows post titles along with comments, giving them more context. [...]

  7. [...] Recent Comments Plugin will add a list of the most recent comments posted to your blog. They are gathered in descending order (newest at the top), but then grouped together by post title, so that comments from the same post are listed together. The list items will be links to the comments, and will contain the name of the commenter. [...]

  8. [...] * install the freepress plugin , show the recent comments. [...]

  9. [...] aggiunto questo plugin chiamato Recent Comments Plugin Widget che consente di vedere gli ultimi commenti lasciati sul sito. Per ora non mi convince molto perché [...]

  10. [...] 2. Freepress Recent Comments plugin [...]

  11. [...] hab’ ich mir noch ein neues Recent Comments Plugin gebastelt, welches die Kommentare nach dem dazugehörigen Beitrag geordnet [...]

  12. [...] WordPress Recent Comments, in case you don’t like standard WP recent comments [...]

  13. [...] chose this plug-in since unlike the others, it gives me a summary of comments in a specific number of words. It would [...]

  14. [...] WordPress Recent Comments Plugin / Widget – Used to display recent comments in the sidebar. [...]

  15. [...] WordPress Recent Comments, in case you don’t like standard WP recent comments [...]

  16. [...] n’est plus développé depuis 2005) que j’ai remplacé par le très chouette FreePress Recent Comments Widget pour afficher les derniers [...]

  17. [...] While not a plugin and requires at least a WordPress 2.1 and theme compatible with widgets this one allows you to display last commenters in sidebar in a nice nested mode. Drug and drop functionality with configurable options on how many comments to display it is a great addition to you blog. [...]

  18. [...] http://freepressblog.org/wordpress-plugins-2/wordpress-recent-comments-plugin-widget/ This plugin will add a list of the most recent comments posted to your blog. They are gathered in descending order (newest at the top), but then grouped by post title, so that comments from the same post are listed together. The list items will be links to the comments, and will contain the name of the commenter. [...]

  19. [...] For WordPress users; FreePress Recent Comments. [...]

  20. [...] Wordpress Recent Comments Plugin / Widget. This plugin will add a list of the most recent comments posted to your blog. And it’s quite customizable! [...]

  21. [...] kullan?c? için elbet daha yararl? olacakt?r.Wordpress kullanc?lar? için FreePress Recent Comments [...]

  22. [...] Use it in conjunction with the WordPress Recent Comments Plugin. [...]

  23. [...] Display recent comments in the sidebar of your blog. Often, readers may not click on the comment section. By displaying the comments in the sidebar, readers can see where and what people have commented. For blogger, you can find a widget here: http://blogger-templates.blogspot.com/2007/03/recent-comments.html. For wordpress, you can find the process described here: http://freepressblog.org/wordpress-plugins-2/wordpress-recent-comments-plugin-widget/ [...]