How to Show Total Posts and Comments in Blogger | Share To World

Thursday, December 4, 2014

How to Show Total Posts and Comments in Blogger

  admin       Thursday, December 4, 2014

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.

logoblog

Thanks for reading How to Show Total Posts and Comments in Blogger

Previous
« Prev Post

2 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
  2. When I originally commented I clicked the -Notify me when new surveys are added- checkbox and after this if a comment is added I purchase four emails with the exact same comment. Can there be that is you can remove me from that service? Thanks! https://royalcbd.com/product/cbd-oil-2500mg/

    ReplyDelete