Tuesday, 20 November 2012

Total Posts and Total Comments Widget For Blogger

Total Posts and Total Comments Widget For Blogger

Hello to all the blogger users today i m going to tell you how add an Total Post and Total Comment Widget
Total Post Widget Tells your visitors the post that are having been published to your blog and also shows that how many comments have been done to your blog so it can encourage to other people to comment on your blog 


    
Q:   1.Is it difficult to install this hack ?
    A: No its so simple that you have to just add anHTML/JAVASCRIPT widget

  1. First login to your Blogger Dasboard .
  2. Then Click on Layout.
  3. Then click on add HTML/JAVASCRIPT.
  4. Add Below Code to it :
    <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://Your-Domain-Name/feeds/posts/default?alt=json-in-script&callback=numberOfPosts"></script>
    <script src="http://Your-Domain-Name/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script>
  5. Then Just Put Custom domain name for Example : www.yoursite.com or yoursite.com
  6. For Blog URL for example. mediafireinpakistan.blogspot.com
  7. Just Click on Save Button
Your Total Post and Total Comments Widget is ready

No comments: