Sunday, April 3, 2011

Total Posts and Comments Widget for Blogger

Here's a cool widget for blogger, to show total number of Posts and Comments about your site.

If you have a good amount of posts and comments, you should use this widget, as it will give a good impression to your site.

How to Apply:
===========

* Login to blogger -> Dashboard -> Layout/Page Element -> Add a Gadget

* Choose HTML/Javascript

* Paste the following code:

<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>
<font ><script src="http://bloggerative.com/feeds/posts/default?alt=json-in-script&callback=numberOfPosts"></script>
<script src="http://bloggerative.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script></font>

* Name it to what ever you like (siteinfo, statistics etc) and save it.

* That's it!

Note: Change my site url "http://bloggerative.com" to your site url. You can also change the Total Posts: and Total Comments: text to whatever you like.

Related Posts by categories



Related Posts Plugin for WordPress, Blogger...
Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Join Bloggerative on Facebook Follow Bloggerative on Twitter Subscribe to RSS Contact Bloggerative
Sponsored by iPhoneMY