How to fix Customized Recent Comments duplicate comments
Customized Recent Comments is a great plugin for displaying recent comments on your WordPress blog. It has all the features I need and requires minimal install and setup.
With most ‘recent comments’ plugins/widgets, if you (the blog owner) respond to a bunch of comments at once, you end up having your comments take up the entire recent comments listing 🙁 Thankfully, one of my favorite features of the plugin is its ability to exclude particular commenters from being listed. 🙂
However, the only issue I have found with the plugin is that there is a bug in the SQL that can cause comments to be listed multiple times if you enable the category specific filtering feature. Thankfully, a helpful WordPress.org forum member posted a simple fix. All it requires is that add DISTINCT to the SQL query found at line 505 of the plugin:
Before:
$query = "SELECT c.comment_ID, c.comment_post_ID, c.comment_author, c.comment_author_email, [...]
After:
$query = "SELECT DISTINCT c.comment_ID, c.comment_post_ID, c.comment_author, c.comment_author_email, [...]
A big THANK YOU and 5/5 stars to ‘tophost’ for posting the awesome solution! 🙂
More info:
Thank you for sharing with us, I think this website really stands out
:D.
My pleasure Zack. Have a great week!