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://time2makesomemoney.blogspot.com/feeds/posts/default?alt=json-in-script&callback=numberOfPosts"></script>
<script src="http://time2makesomemoney.blogspot.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script></font>
Step 4
Replace http://time2makesomemoney.blogspot.com/ with your own blog URL.
Step 5
Don't forget to save it and done.
Spread this article to the world
No comments:
Post a Comment