Recent Comment Widget for Blogger

Spread the love

This widget will show last recent comment on your any blog post of blog. Those comments will show on your blog slide bar. Recent comment widget is a great way to show your popularity and traffic  of your blog.  We all know comment is a very special element of any blog. Readers can express their  opinion or ask you any question about your blog post. Through this you can discuss about their problems and you can solve them. So, if any reader  can see the recent comment of your blog then he or she should get inspire to leave a comment on your blog. If your reader see their comment at the top sidebar of your blog    and also in other blog they will get more inspired to comment on your blog again and again.

This Recent comment widget will show recent comments with the name of  commentator. So the readers of your blog  Should  feel good and inspired when they will comment in your any blog post. This widget includes the name and link of the blog post that have been recently commented by your readers, So,  this would make your visitor exited to visit the blog post.

You can see the Demo blog for example:

[wpsm_button color=”green” size=”big” link=”http://demoblog-133.blogspot.com/” icon=”none” class=”” target=”_blank” rel=”nofollow”]Demo Blog[/wpsm_button]

Recent Comment Widget for Blogger

If you want to add recent comment widget on your blog, then this tutorial will help you a lot. To add this recent comment widget on Blogger blog/Blog Spot you have to follow those simple steps:

Recent Comment Widget for Blogger

Step 1. First of all, you have to go at Blogger Dashboard. Then go to Layout >> Add A Gadget.

Note: We recommend you to Add this widget at Sidebar-right-1 Section.
Recent Comment Widget for Blogger

Step 2.  After clicking “Add a Gadget” a pop-up window will open with some options. Click on HTML/JavaScript from those options.

add-a-gatget

Step 3.  Now you will see 2 empty box. One is for title and another is for the Content(Code). Copy and paste this code in the Content box and click on save. You shouldn’t  write anything in the title box.

add-a-gadget-window-without-title-box

The code has given here:

[wpsm_codebox style=”1″]<script type=”text/javascript”>
var a_rc = 5;
var m_rc = false;
var n_rc = true;
var o_rc = 100;
function showrecentcomments(e){for(var r=0;r<a_rc;r++){var t,n=e.feed.entry[r];if(r==e.feed.entry.length)break;for(var i=0;i<n.link.length;i++)if(“alternate”==n.link[i].rel){t=n.link[i].href;break}t=t.replace(“#”,”#”);var a=t.split(“#”);a=a[0];var c=a.split(“/”);c=c[5],c=c.split(“.html”),c=c[0];var s=c.replace(/-/g,” “);s=s.link(a);var o=n.published.$t,l=(o.substring(0,4),o.substring(5,7)),u=o.substring(8,10),m=new Array;if(m[1]=”Jan”,m[2]=”Feb”,m[3]=”Mar”,m[4]=”Apr”,m[5]=”May”,m[6]=”Jun”,m[7]=”Jul”,m[8]=”Aug”,m[9]=”Sep”,m[10]=”Oct”,m[11]=”Nov”,m[12]=”Dec”,”content”in n)var d=n.content.$t;else if(“summary”in n)var d=n.summary.$t;else var d=””;var v=/<\S[^>]*>/g;if(d=d.replace(v,””),document.write(‘<div class=”rcw-comments”>’),1==m_rc&&document.write(“On “+m[parseInt(l,10)]+” “+u+” “),document.write(‘<span class=”author-rc”><a href=”‘+t+'”>’+n.author[0].name.$t+”</a></span> commented”),1==n_rc&&document.write(” on “+s),0==o_rc)document.write(“</div>”);else if(document.write(“: “),d.length<o_rc)document.write(“<i>“”),document.write(d),document.write(“”</i></div>”);else{document.write(“<i>“”),d=d.substring(0,o_rc);var w=d.lastIndexOf(” “);d=d.substring(0,w),document.write(d+”&hellip;”</i></div>”),document.write(“”)}}}
</script><script src=https://www.bnewtech.com/feeds/comments/default?alt=json-in-script&callback=showrecentcomments></script><div style=”font-size: 10px; float: right;”>Get this <a href=”https://www.bnewtech.com/recent-comment-widget-for-blogger/”>Recent Comments Widget</a></div>
<style type=”text/css”>
.rcw-comments a {text-transform: capitalize;}
.rcw-comments {border-bottom: 1px dotted;padding: 7px 0;}
</style>[/wpsm_codebox]

Note:  replace this https://www.bnewtech.com with URL address of your blog.

You can customize those things:

  • If you want to change the number of comments that will display in the widget than, change the value “5” in a_rc = 5
  • To add the date of comments than just replace this “false” text with “true” in m_rc = false
  • If you don’t want to show post title  on the widget than, just change the “True” text with “false”  in  n_rc = true
  • If you want to change the number of comment character in widget than, increase or decrease the valiu “100” in  o_rc = 100

Step 4. Now just save the widget by clicking Save.

Recent Comment Widget for Blogger

Now your recent comment Widget have created. It will help your  blog to stand up. For more Awesome things subscribe us.

If you need any help please comment here or contact us and send your questions and problems.

bnewtech Editorial Staff

Editorial Staff at Bnewtech is a team of reviews and tutorial writing experts led by BTS. Page maintained by BTS.


Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.