How to show total number of posts and comments in Blogger by Harshit

21:38 AUXINS 0 Comments

                             
Hai everyone today I will tell you how to show the total number of posts and comments in Blogger.This can be done by a simple a javascript gadget.So lets get started.
                  STEPS TO FOLLOWED BY YOU.


  1. Go to Blogger dashboard>layout.
  2. Then click on Add a gadget,
  3. And select Javascript/Html gadget.
  4. Now copy and paste the below code in the content area .
<script style="text/javascript">function mbhTotalCount(json) {document.write(parseInt(json.feed.openSearch$totalResults.$t,10));}</script><p style="font:20px Tahoma;">Total Posts: <script src="http://www.example.com/feeds/posts/default?alt=json-in-script&callback=mbhTotalCount"></script></p><p style="font:20px Tahoma;">Total Comments: <script src="http://www.example.com/feeds/comments/default?alt=json-in-script&callback=mbhTotalCount"></script></p>

Note:-You have to replace the http://www.example.com with your blog address.
                       Save it & check your blog wow!!

0 comments: