WordPress Recent Comments with Excerpt and Gravatar
I build a lot of WordPress websites and it’s great that there are so many plugins available for various functions, but sometimes I run into a situation where the right plugin just doesn’t exist (or if it does I didn’t find it). I needed a widget to display the WordPress recent comments with the comment excerpt and the users gravatar (globally recognized avatar). Here’s what I came up with, modified based on some code from others looking for a similar solution:
WordPress Recent Comments with Excerpt and Gravatar
I build a lot of WordPress websites and it’s great that there are so many plugins available for various functions, but sometimes I run into a situation where the right plugin just doesn’t exist (or if it does I didn’t find it). I needed a widget to display the WordPress recent comments with the comment excerpt and the users gravatar (globally recognized avatar). Here’s what I came up with, modified based on some code from others looking for a similar solution:
Put this into your sidebar template or elsewhere:
Here’s the CSS styling I’m using (you may need to modify it according to your theme):