Sunday, January 12, 2014

Simple Recent Comments Widget for Blogger!

If you are regular blogger then you know the importance of comment for a blog. Actually commenting is one of the most successful way to increase the engagement of visitors with a blog or site. Normally a visitor only be able to see the comments, when he visit a specific post. But if you can show the recent comments of your blog in the sidebar then it would be more participatory. And in this post I 'm gonna share a simple recent comment widget for blogger.

Recent Comments



Have look at widget above, it showing the 5 most recent comments of this side. As you can see it is showing the snippet of the comments along with the title of the post where the comment was made. Here the newest comment will be shown at the top. This widget is codded with JavaScript and styled with CSS. The design of the widget has nothing too much, so it could easily fit with your blog design. And you have nothing much to do with this widget, all you need just to add the code to your blog that I'm sharing. Let's see how to add...


Adding Recent Comments Widget to Blogger:
  • First Sign into your Blogger Account and go to Dashboard.
  • Then click on the Layout option.
  • Then here click on the Add a Gadget link where you wanna place the widget
  • Then from the gadget list choose HTML/JavaScript.
html javascript
  • Now Paste following code inside the Content box.
 <table border="1" style="width: 100%;">  
  <tbody>  
 <tr>  
   <td><b><span style="font-family: Georgia, Times New Roman, serif; font-size: large;"><u>Recent Comments</u></span></b><br />  
 <script src="http://helplogger.googlecode.com/svn/trunk/recent comments widget.js"></script>  
 <script>  
   var a_rc = 5;  
   var m_rc = false;  
   var n_rc = true;  
   var o_rc = 100;  
 </script>  
 <script src="http://www.ittimesbd.com/feeds/comments/default?alt=json-in-script&amp;callback=showrecentcomments"></script><br />  
 <div style="float: right; font-size: 10px;">  
 Get this <a href="http://www.ittimesbd.com/2014/01/how-to-add-recent-comment-widget-in-blog.html" rel="nofollow">Recent Comments Widget</a></div>  
 <style type="text/css">   
 .rcw-comments a {  
   text-transform: capitalize;  
 }  
 .rcw-comments {  
   border-bottom: 1px dotted;  
   padding-top: 7px!important;  
   padding-bottom: 7px!important;  
 }  
 </style></td>  
  </tr>  
 </tbody></table>  

Customization:
  • In the above code Replace www.ittimesbd.com with your site's Homepage URL. 
  • To change the number of comments that are being displayed replace "5" value from  var a_rc = 5 
  • To add the date on which the comment has been made, change false text from  var m_rc = false to true. 
  • To hide the post title, change true text from var n_rc = true to false
  • To show more or less characters on the widget, change 100 value from  var o_rc = 100
  • Finally click on the Save button.

That's it, now view your bog and you will see the widget showing the recent comment of your blog.


Stay with www.iTTimesbd.com for more IT related post

2 comments:

  1. Thank you for the code I was not aware of this and asking my developer to put in on my Cisco ip phones blog site but he was so much busy in his work, thank you for sharing this one.

    ReplyDelete
    Replies
    1. Most Welcome, its completely my pleasure. Keep visiting for much more...

      Delete