Search This Blog

Friday, October 29, 2010

Create Recent Comments with JavaScript code

If you want to show more than 5 Recent Comments  in your sidebar widget,  Then follow  this  Trick.

1.   Login to blogger with your ID
2.  After entering the Dashboard page, click Layout
3.  Then click  Page Element
4.  Then click Add a Gadget
5.  Select -  HTML/Javascript

     Copy and Paste this following code :



<script style="text/javascript" src="http://sites.google.com/site/angga123site/comments.txt"></script>
<script style="text/javascript">var numcomments = 10;var showcommentdate
 = true;var showposttitle = true;var numchars = 100;var standardstyling = true;
</script><script src="http://YourBlogURL.com/feeds/comments/default?
alt=json-in-script&callback=showrecentcomments"></script>


Change YourBlogURL.com  with  your url
(for example: kaushiksons-blogteacher.blogspot.com).
You can also change the number of recent comments to show,  just change the number "10"  with any number you like.

Click Save and see the result. - Now you have a  recent comments widget for blogger.



When your problem is fixed,  Please don't forget to leave a comment.,  Happy blogging !!

No comments:

Post a Comment