Make Widget Statistics For Counting Comments And posts article in Blogger
Published 18 February 2010 And 814 views
Have you ever wanted to make a comment or calculating statistics counting the number of post to make it easier for someone to see how much you have interesting articles that will be seen and in this article I will help you to make a calculation of statistics and the number of article comments or posts in your article. And this is a very simple way because you only need to add some JavaScript code in your blogger or website :
DEMO HERE
and you have to look at SideBar.
Add Code Bellow :

See article with blue background should be replaced with your blog address.
<script style="text/javascript">function numposts(json) { document.write('Total Posts :' + json.feed.openSearch$totalResults.$t + '<br>'); }function numcomments(json) { document.write('Total Comments :' + json.feed.openSearch$totalResults.$t + '<br>'); }</script>
<script src="http://Your-Site-Link/feeds/posts/default?alt=json-in-script&callback=numposts"></script>
<script src="http://Your-Site-Link/feeds/comments/default?alt=json-in-script&callback=numcomments"></script>
Do not forget to replace Your-Site-Link to address your link then use Add Widget Html and JavaScript to add the code into your blog :

All of this is a very easy way to make your site look more attractive and hopefully these tips can help you. If you do not get to do maybe you can give comments or tips are more interesting than this article.





