How to Add Recent Comment Via Script in Blogger/Blogspot

Because previously I've posted about how to add recent post via script. So it's not complete if I did not discuss about how to add recent comments via script.

For those of you who've read my post about how to add recent comments via feed. May ask what is the difference between the recent comment via feeds and script.

To answer this question please read my post about how to add recent post via script. You'll find the answer.

Ok, without much conversation, for those of you want to put recent comments via script, just follow the steps below:

1. Login to Blogger and click on Design -> Page Elements
2. Click the Add a Gadget -> HTML / Javascript
3. Copy and paste the code below into the box "content".

<script style=text/javascript src=http://hbhost.googlecode.com/files/recent-comments.js></script><script style=text/javascript >var a_rc=5;var m_rc=false;var n_rc=true;var o_rc=100;</script><script src=http://Your-blog.blogspot.com/feeds/comments/default?alt=json-in-script&callback=showrecentcomments ></script> <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>

Note :

Number 5 on a_rc indicate the number of comments that appear. Change the value if necessary.

false at m_rc indicate the date comments are not shown. Type "true" if you want to display the date.

true on n_rc, indicating post title is displayed. Type "false" if you don't want to display it.

Don't forget to replace the bold text with the name of your blog.

4. Save and see the results.
Good Luck.


Related Posts

G+

0 comments:

Post a Comment