Total Posts and Comments Widget
Sunday, October 11, 2009Maybe you once saw on your friends’ blogs or other’s blog installing the statistics widget of total posts and total comments. If you are interested in that widget, you can follow the instruction below because it’s easy. To install the total posts and comments widget, you can do manually or automatically.
Install Widget manually
- Please login to blogger with your own ID.
- Click Layout.
- Click Page Element tab.
- Click Add a Gadget.
- Click the sign plus ( + ) for HTML/JavaScript.
-
Copy and paste the code below in the available column
<script style="text/javascript">
function totalPosts(json) {
document.write('Total Posts: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');
}
function totalComments(json) {
document.write('Total Comments: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');
}
</script>
<script src=" /feeds/posts/default?alt=json-in-script&callback=totalPosts"></script>
<script src=" /feeds/comments/default?alt=json-in-script&callback=totalComments"></script> - Click SAVE.
- Done
Install Widget automatically
Please log in to blogger first, and then click the button below, and the total posts and comments widget will be installed automatically. It is very easy, isn’t it?
Enjoy your new widget!