Statistics widget for blogger

by Deineshd on October 8, 2008

Statistics Widget For BloggerStatistics 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.

Consider to Subscribe to our RSS feed or Follow us at Twitter or Join our Facebook Fan Page.Enter your Email below to subscribe to our updates via Email.

Enter your email address:

Delivered by FeedBurner

Similar Posts

Powered by Thesis

Thesis Theme

An amazing WordPress Theme, nothing beats the versatility and SEO friendliness of the Thesis framework.

From beginners, to the most advanced WordPress developers, Thesis makes it easy for anyone to customize it.

{ 12 comments… read them below or add one }

techniqueal t. October 8, 2008 at 8:36 am

hi. this is a great widget! been looking for this for a long time. thanks for sharing this ^_^

Reply

indungg October 8, 2008 at 1:07 pm

it’s not work on my blog??
so,how?

Reply

Deinesh October 8, 2008 at 2:10 pm

@ Indungg

This 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.

Reply

Johan Carlsson October 9, 2008 at 2:08 am

Thanks for a great widget. I like to be able to show posts and comment counts. It gives me a bit of bragging rights:)

Reply

Sherry October 9, 2008 at 2:44 am

thank you for giving the code, it works on http://sherryshopping.blogspot.com I can’t wait to test out on other blogs :)

Reply

template-godown October 10, 2008 at 8:42 pm

nice work.

thank you for share, i ask your permission to post about this useful script on my blog also.

thank you.

Reply

Manick October 13, 2008 at 6:50 am

Hi,

Thanks for the link back to my blog. Appreciate that.

Reply

Cristian Olteanu October 14, 2008 at 9:57 am

Great tip, I will try using it on my blog.

Reply

0612 October 18, 2008 at 11:55 am

Very nice one! I’ll be using it. Thanks a lot!

Reply

filozzoff November 19, 2008 at 4:44 pm

perfect, thank you

Reply

LoLLY JeaN May 13, 2009 at 10:43 am

doesn’t work?
always 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?

Reply

Kristanna September 29, 2009 at 6:10 am

This is very interesting work.Thanks for sharing it.These help me alot to upgrate my blog attractive.
externe festplatten

Reply

Leave a Comment

Previous post:

Next post: