Add Recent Comments Widget with Avatars To Blogger

In one of my previous tutorials, I have shared a simple Recent Comments widget having the ability to display the latest comments published on the blog posts. However, the main disadvantage of it was that it didn't have the option of showing the users' avatars; so for those who'd like to see something more, here's a stylish Recent comments widget with round avatars and comment excerpts. Besides providing the option of displaying the commenters avatars, we'll be able to change the default image for the anonymous avatar, as well.

Isn't that great? Let's begin adding it!


How to add recent comments widget with avatars

Step 1. Go to Blogger Dashboard > select your blog > go to 'Layout' & click the 'Add a Gadget' link.

avatars, recent comments blogger, blogger widgets

Step 2. When the popup window appears, scroll down and choose the 'HTML/Javascript' gadget.


Step 3. Now, copy and paste the following code inside the empty box:
<style type="text/css">
ul.helploggercomments{list-style: none;margin: 0;padding: 0;}
.helploggercomments li {background: none !important;margin: 0 0 6px !important;padding: 0 0 6px 0 !important;display: block;clear: both;overflow: hidden;list-style: none;word-break:break-all;}
.helploggercomments li .avatarImage {padding: 3px;
background: #fefefe;-webkit-box-shadow: 0 1px 1px #ccc;-moz-box-shadow: 0 1px 1px #ccc;box-shadow: 0 1px 1px #ccc;float: left;margin: 0 6px 0 0;position: relative;overflow: hidden;}
.avatarRound {-webkit-border-radius: 100px;-moz-border-radius: 100px;border-radius: 100px;}
.helploggercomments li img {padding: 0px;position: relative;overflow: hidden;display: block;}
.helploggercomments li span {margin-top: 4px;color: #666;display: block;font-size: 12px;font-style: italic;line-height: 1.4;}
</style>
<script type="text/javascript">
//<![CDATA[
    // Recent Comments Settings
    var
 numComments  = 5,
 showAvatar  = true,
 avatarSize  = 60,
 roundAvatar = true,
 characters  = 40,
 showMorelink = false,
 moreLinktext = "More »",
 defaultAvatar  = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG40OLCbN6IzopBwXi6JcsRrHE0znqYX5W3LUBQUjr0M5ueYA8h1jIwdl8cFsU6WptY80Q5U6gsDXk8MJ59I0PhRTa8X2_rjRdWX-Db2sBqUyP0Lz60xfea4e7oBzhnYyC3T_YDIrX_B4h/s1600/default-avatar.jpg",
 hideCredits = true;
//]]>
</script>
<script type="text/javascript" src="http://helplogger.googlecode.com/svn/trunk/helplogger/[helplogger.blogspot.com]recent-comments.js"></script>
<script type="text/javascript" src="/feeds/comments/default?alt=json&callback=helploggercomments&max-results=5"></script><div style="font-size: 10px; float: right; margin-top: -15px">Get this <a href="http://bloggerchive.blogspot.com/2012/03/add-recent-comments-widget-with-avatar.html" >Recent Comments Widget</a></div>
Note
- by default, 5 comments will be displayed... to show more replace the "5" values in red
- to change the avatar for anonymous users, replace the following address with the url of your image:
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG40OLCbN6IzopBwXi6JcsRrHE0znqYX5W3LUBQUjr0M5ueYA8h1jIwdl8cFsU6WptY80Q5U6gsDXk8MJ59I0PhRTa8X2_rjRdWX-Db2sBqUyP0Lz60xfea4e7oBzhnYyC3T_YDIrX_B4h/s1600/default-avatar.jpg
- to change the size of the avatar, replace 60 value in green.
- for square avatars, remove the line in red

Step 4. After you've made the changes, click Save... and we're done!

Once a reader sees the recent comments widget in the blog's sidebar, he comes to know that your blog is pretty active and that encourages him to post comments on your blog. This way, you can gather some active user base to comment on your blog posts.

Comments/disqusion
72 comments

  1. says:

    Doesn't work on my blog :(

  2. says:

    NVM I feel stupid, I use disqus comment, do you know how to set it up for disqus. Thanks :)

  3. says:

    Hi John,

    You can get Disqus Recent Comments Widget by logging into your Disqus account, then go to Tools tab and from there you can copy the code for your widget.

  4. says:

    wow. my blog: http://www.blog-ph.com/ is more cute now :) thank you helplogger

  5. says:

    Awesome Work I Like It

  6. says:

    got it! it works. thanks helpblogger!

  7. says:

    Great! It works perfectly on my blog. :)
    Thank you...

  8. says:

    nice hack

  9. says:

    i can't seem to get thsi to work..
    your other one works ..

  10. says:

    Super, Thank You!

  11. says:

    it's work but why admin also in the widget ??

  12. says:

    Berkunjung sob,ditunggu
    kunjungan baliknya

  13. says:

    Not working

  14. says:

    It's a great help. Thanks U dude ...

  15. says:

    its works.. thanks! -from Malaysia

  16. says:

    wow!!! amazing. thanks ya

  17. says:

    Köszönöm!!:)

  18. says:

    Design? Page elements?
    I see these menu items nowhere on the menu.

    And when I change the favicon in "layout" (on lefthand side of page) it has no effect. I cannot replace my old icon.

  19. says:

    this is usefull to me

  20. says:

    I used and change to avatar..change no of comment..but can't work

  21. says:

    Why the avatar didnt comuout....

  22. says:

    thanks sir its work nice widget

  23. says:

    OMG OMG OMG thanks you so much this box looks really good on my blog <33 thanks !!! :D

  24. says:

    Nice...that's working......Wohh..

  25. says:

    how to exclude the blog author comment?

  26. says:

    How do you get this type of commenting system? like the one with the pictures etc

  27. says:

    How can you make cooler anoymous pictures? On my site it just shows that thing with no picture

  28. says:

    Its work nice widget.I appreciate your post.Thanks so much and let keep on sharing your stuffs.

  29. says:

    not working for me... idont see the output after i copied and changed the details as written. :(

  30. says:

    This is fabulous! Thank you for posting this tutorial. (:

  31. says:

    Is working and is fabulous!! Thank you so, so much!!!!

  32. says:

    Nice...
    It works on my blog...
    thanks

  33. says:

    cool... works well on my blog
    http://blog3kaki.blogspot.com/

  34. says:


    Thanks for the great article..

  35. says:

    Thanks for sharing.

  36. says:

    it works my friend... thank you so much, from Philippines..

  37. says:

    avatar-image-container

  38. says:

    A very useful article! Thanks.

  39. says:

    Thank you, it works on my blog. I use standard theme instead of Dynamics.

  40. says:

    Doesn't work

  41. says:

    Thanks for yout tips, it's cute! It works on my blog but it's not the most recent comment, any idea why?

  42. says:

    Thanks. It works

  43. says:

    I have tried but still can't appears,,, maybe some problem on my template.
    Visit back on my blog please,,, to every one :)
    http://juragancipir.blogspot.com
    thx

  44. says:

    It work! Thanks!!

  45. says:

    Thanks for sharing... :D

  46. says:

    Love it! Thanks!

  47. says:

    I've just add this code above and it works correctly..

    Thank you for sharing

  48. says:

    A million thanks!

  49. says:

    Cool, thank you :)
    http://ayungavis.blogspot.com

  50. says:

    great tip !! keep the good work !

  51. says:

    Works beautifully - THANK YOU!

  52. says:

    works perfect.
    .thanks.

  53. says:

    It may be that I am unfamiliar with C&P codes, but I tried to use the first tutorial and after I (Did change with original blog address) Saved and went and checked it was wrong. What I saw after clicking "Recent Comments" was a link to the tutorial. I think maybe I used to much of the code. I would like to use the code here with the Rose, but I think I need it to be broken down to what I should exactly Copy & Paste. I would appreciate any help. Thank you! May you have a Blessed 2014.

  54. says:

    Thanks for tips:)

  55. says:

    tq bro, it's awesome. have it attached in my blog

  56. says:

    This is really awesome! My old widget was broken and I used your advice. Works perfectly, thank you so much! Andreas

  57. says:

    Thanks, Its working on my blog

  58. says:

    Works fine in my blog except for the round part, which puzzles me.

  59. says:

    Hi Lyrans,

    You have the option to remove the roundness of the avatars, just delete the line in red from above (I've updated my post). Thanks for visiting!

  60. says:

    Many thanks for this great widget which works well.
    However I have changed to google+ comments system on my blog http://lastingrose.blogspot.co.uk
    Is there an rss feed for these comments or a way to extract and show in the widget?

  61. says:

    Thanks so killer! Thank you!!

  62. says:

    It worked perfectly -- I love the round icons and the choice of replacing the boring anonymous icon with my own image..thank you so much!!

  63. says:

    i like this blog,so owesome....!!!

  64. says:

    wow, very easy to do,,

    Thanks

  65. says:

    It looks like I can't customize this widget. I actually changed the number of comments to 6 and set the number of shown characters to 110, but it definitely doesn't show these changes.

  66. says:

    cool .. it work ^^

  67. says:

    Also it doesn't show the default avatar I set, even though it leads precisely to the link of the image I want to have as the default avatar for the widget.

  68. says:

    Hi,
    It doesn't work for me, after the modifications, I juste can read the following information on my blog :
    "get this recent comments widget".
    By the way, thank you for this great tutorial, I hope I'll find a widget.

    Greetings from France.

  69. says:

    thanks... very cute ^_^

  70. says:

    I really like this widget, but it is not working on my blogspot, either. If I don't replace helplogger with my blog name (wingsofprophecy), I get YOUR comments - lol, but if I replace it in the html code (several places - which may be what I'm doing wrong), then nothing displays at all, except my caption, Most Recent Comments. Can you please tell me what I am doing wrong? My blog gets a mil or so hits a year, and this would be really helpful. I originally came to your page looking for a way to make most recent comments appear first on one of my pages and found this.

  71. says:

    Hi Glynda,

    Please add the code again, you don't have to replace any address. I hope it works now!

  72. says:

    Please make one for Disqus too...