|
Do you want to show the number of total posts and comments of your Blogger powered blog? If yes, then this simple trick is definitely what you are looking for. This simple tool works by using JavaScript, which function is to count your the total number of posts and comments based on your feeds. Here is an example of such widget:
Interested? Here are the step by step guide on how to create such gadget:
1. Login to Blogger.com,
2. Visit you dashboard >> layout >> page elements.
3. Click "Add a Gadget", choose HTML/JavaScript.
4. Paste these codes there, change the bold ones with your blog address:
5. Save and done.
Visit your blog to check the counts. If you are quite savvy with JavaScripts, feel free to customize it. Let me know if your need further assistance.
Interested? Here are the step by step guide on how to create such gadget:
1. Login to Blogger.com,
2. Visit you dashboard >> layout >> page elements.
3. Click "Add a Gadget", choose HTML/JavaScript.
4. Paste these codes there, change the bold ones with your blog address:
<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="blue">
<script src="http://your-blog-name.blogspot.com/feeds/posts/default?alt=json-in-script&callback=numberOfPosts"></script>
<script src="http://your-blog-name.blogspot.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script>
</font>
5. Save and done.
Visit your blog to check the counts. If you are quite savvy with JavaScripts, feel free to customize it. Let me know if your need further assistance.
0 comments:
Post a Comment