Blogger

How to Show Total Posts and Comments in Blogger


Do you want to show the number of total posts and comments of your blogger powered blog?? If yes, then this simple tricks is definitely what you are looking for. This simple tools works by using JavaScript, which function is to count your total number of posts and comments based on your feeds.  It is very easy to add this widget in your blogger blog just add below given JavaScript in your blog.


1- Log in - in your blogger account

2- Select your blog in which blog you want to Display total number of posts and comments

3- Go to Layout option
4- In Layout option there, click on Add Gadget option
5- Select HTML/JavaScript gadget
6- Paste the below JavaScript code in the content box

<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.yourURL.com/feeds/posts/default?alt=json-in-script&callback=mbhTotalCount"></script></p><p style="font:20px Tahoma;">Total Comments: <script src="http://www.yourURL.com/feeds/comments/default?alt=json-in-script&callback=mbhTotalCount"></script></p>

Note: Replace http://www.yourURL.com with your blog URL

7- Now press Save button.


1 comments:

  1. Good post and I like it very much. By the way, anybody try this Sony SD Card Recovery Software? I try it and I think it is good.

    ReplyDelete

Powered by Blogger.