Tuesday, July 13, 2010

Total Number of Posts and Comments - Blogger Gadget

You can add the total number of posts and comments as a blogger gadget. In your design page, add an HTML/Java Script gadget, and put in the following code:
<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>
<script src="http://PLEASEMAKEANOTE.BLOGSPOT.COM/feeds/posts/default?alt=json-in-script&callback=numberOfPosts"></script>
<script src="http://PLEASEMAKEANOTE.BLOGSPOT.COM/feeds/comments/default?alt=json-in-script&callback=numberOfComments">
</script>
Voila!
Don't forget to put in your blogger url.
I picked this up from bloggerstop. You can find the original post here:

Cite as:
Saad, T. "Total Number of Posts and Comments - Blogger Gadget". Weblog entry from Please Make A Note. http://pleasemakeanote.blogspot.com/2010/07/total-number-of-posts-and-comments.html

3 comments:

  1. We have professional online trainer and we are providing online sclerotherapy, sclerotherapy training.please visit this website http://www.sclerotherapytrainingonline.com/

    ReplyDelete
  2. thanks I used it on my blog..
    http://www.khurafatipoint.blogspot.com/
    thanks for sharing..:)

    ReplyDelete
  3. This is really attention-grabbing, You are an excessively professional blogger.I have joined your rss feed and sit up for in quest of more of your great post. Also, I have shared your site in my social networks.
    website design

    ReplyDelete