Add Widget To show Total Posts and Total comments (Count)

12:38:00 PM |

A very useful widget for blogger to show Number of comments and posts in your Blog.

Just follow some simple steps to implement this widget


Login to your Blogger Dashboard.
Click on design->Add A gadget->Html/Java Script.
Copy the code below and paste it there



<div align="left">
<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://itsmyownplanet.blogspot.com/feeds/posts/default?alt=json-in-script&callback=numberOfPosts"></script></li>
<li><script src="http://itsmyownplanet.blogspot.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script></li></ul>
<span style="font-size:75%;"></span>
</div>