Statistics is a widget that shows the total no of posts and comments in your blog.The credits of this widget goes to Assess My Blog.This widget is featured here on the request of our reader Sherry.To show your blog statistics in your blog sidebar,copy the following code and paste it in your blog by Adding a new gadget -> HTML/JavaScript.
<script style="text/javascript">
function numberOfPosts(json) {
document.write('Total Posts: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');
}
function numberOfComments(json) {
document.write('Total Comments: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');
}
</script>
<ul><li><script src="http://yourblog.blogspot.com/feeds/posts/default?alt=json-in-script&callback=numberOfPosts"></script></li>
<li><script src="http://yourblog.blogspot.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script></li></ul>
<noscript><a href="http://assessmyblog.blogspot.com/" target="_blank">Widgets for Blogger</a> | <a href="http://www.bloganol.com" target="_blank">Bloganol</a></noscript>
In the above code change yourblog with your blog name and Save the code and see the wiget working.

hi. this is a great widget! been looking for this for a long time. thanks for sharing this ^_^
ReplyDeleteit's not work on my blog??
ReplyDeleteso,how?
@ Indungg
ReplyDeleteThis widget works with every blogger blog.I think you have used this code it in Html section of your blog or you can try this code by adding www after http:// in the code.
Thanks for a great widget. I like to be able to show posts and comment counts. It gives me a bit of bragging rights:)
ReplyDeletethank you for giving the code, it works on http://sherryshopping.blogspot.com I can't wait to test out on other blogs :)
ReplyDeletenice work.
ReplyDeletethank you for share, i ask your permission to post about this useful script on my blog also.
thank you.
Hi,
ReplyDeleteThanks for the link back to my blog. Appreciate that.
Great tip, I will try using it on my blog.
ReplyDeleteVery nice one! I'll be using it. Thanks a lot!
ReplyDeleteperfect, thank you
ReplyDeletedoesn't work?
ReplyDeletealways says:
"Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The reference to entity "callback" must end with the ';' delimiter."
what should i do?