How to show total posts and total comments on your blog? interested to know? now i'm going to show you how can we add it. Follow the simple way below to add it.
Step 1
Login to your blog >> Layout >> Page Element >> Add Gadget >> HTML / JavaScript
Step 2
Copy and paste code below there.
<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 color="black"><script src="http://adsense-day.blogspot.com/feeds/posts/default?alt=json-in-script&callback=numberOfPosts"></script>
<script src="http://adsense-day.blogspot.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script></font>
Step 4
Replace http://adsense-day.blogspot.com/ with your own blog URL.
Step 5
Don't forget to save it and done.
June 17, 2009 at 7:46 PM
Nice widget to have on a blog. i need the widget that show the highest commentator on blogger