mfuchs
Member
Posted 8 months ago #
Dear all,
I searched the Forum and Google but could not find a solution to what I am looking for:
I want to display the last 5 posts that were commented on. Not the last 5 comments, the last 5 posts that people commented on. That way the same post would not show up twice if two people commented on the same post within the last 5 comments.
In addition I'd like to show the name of the commenter and the comment count. I guess that's the smaller problem, but does anybody know how I can display the last 5 posts that were commented on?
Any help would be highly appreciated.
Thanks a lot,
Martin
Just installed this plugin:
http://coffee2code.com/wp-plugins/customizable-post-listings/
http://wordpress.org/extend/plugins/customizable-post-listings/
Put this in theme's sidebar.php:
<?php
if(function_exists('c2c_get_recently_commented')) {
c2c_get_recently_commented();
}
?>
mfuchs
Member
Posted 8 months ago #
Perfect! Thanks a lot!
I actually used the following code in order to not display the time of the comment but the commenters name in addition.
<?php
c2c_get_recently_commented(5, "<li>%comments_URL%<br />%comments_fancy%<br />%last_commenter%</li>");
?>