Your Ad Here

How to show your live stats (total posts and comments on your blog)

Are you interested to show your total number of posts and comments, yes I know that you love this.

example:

Total Posts: 1969
Total Comments: 2455
So lets begin / Follow Steps
1. Log in blogger dashboard
2. Click Layout --> Page Element --> Add Gadget
3. Find HTML / JavaScript and click add.
4. Copy code below and paste 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://blogotemplates.blogspot.com/feeds/posts/default?alt=json-in-script&callback=numberOfPosts"></script>
<script src="http://blogotemplates.blogspot.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script></font>
5. Replace http://blogotemplates.blogspot.com/ with your link.
6. Save it.

That's it, need help or want to customize it, just leave a comment.

Comments

0 Responses to "How to show your live stats (total posts and comments on your blog)"

Comment If you like the template we will appreciate it