Total Post And Comments Counter Widget

>> Friday, March 20, 2009

Total Comments : 3099
Total Posts : 1233


1) Layout

2) Add a Gadget

3) HTML/Javascript

4) Add the below codes



<script style="text/javascript">
function showpostcount(json) {
document.write('Total Posts : <b>' + parseInt(json.feed.openSearch$totalResults.$t,10) + '</b><br>');}</script>
<script src="http://yourblog.blogspot.com/feeds/posts/default?alt=json-in-script&callback=showpostcount"></script>

<script style="text/javascript"></script>
<script style="text/javascript">
function numberOfComments(json) {
document.write('Total Comments : <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');}</script>
<script src="http://yourblog.blogspot.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script>


5) Replace red code with your blog name





Bookmark and Share

3 comments:

azuraiz,  April 5, 2009 at 5:43 AM  

thank you for this tips..

Ashish K August 17, 2009 at 11:30 AM  

Thanks buddy this will surely help me :D

Millionaire Acts November 2, 2009 at 10:32 PM  

Does this apply to wordpress blogs as well?

Post a Comment

Resources Blogs
Top  blogs

  © Blogger template Socolatajuz by Rahman Bashri 2011

Back to TOP