
Now How to add this widget to you Blog. Follow the instructions.
Go to dashboard of your blogger > Layout > Add a Gadget > HTML/JAVASCRIPT
Add the below codes to it-
<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://anshuldudeja.blogspot.com/feeds/posts/default?alt=json-in-script&callback=numberOfPosts"></script></li>
<li><script src="http://anshuldudeja.blogspot.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script></li></ul>
<noscript><a href="http://anshuldudeja.blogspot.com" target="_blank">Blogger Hacks</a></noscript>
Now Just change the code in red to your blog url or your domain name to display of your total no of posts and comments.
And now save it. Its Done enjoy using this.



10 comments:
Hi. How are you? It's nice to read your blog. So, I just drop EC for you. Keep on working on it. Don't forget to Keep on Smiling. Salaam.
Thanx sofhal it will get better with time for sure with your all help.
Hi,
Thanks for writing about this widget and a link back to my blog. Appreciate that.
wow.. nice tips bro.. :) and thanks for sharing ..
That's great!
Is there any way to adjust the code so only the last months' posts are calculated?
Its not showing up on my blog... Take a look at it here: http://testblogsnam23.blogspot.com/
Its all messed up difficult to check !!
hi there,
i tried this but it wont work!
Thanx Yen for informing i fixed it up now its working now you can use it.
thanks man its really helpful information
Post a Comment