Sponsor 1
custom
codes

Make Total Posts and Comments on Widget Blog


Labels: ,

custom-codes - This time I will be a tutorial on how to display the number of comments and posts on the blog. This article I wrote, when I visited a neighboring blog, I am very interested in this one tutorial blog, so there is no harm in it if I share the knowledge with you all.

How to display the number of blog posts and comments is easy, especially if you have a number of articles and comments that much. You can show or display them on your blog, or even create a blog visitor feel confident that he come to the correct place.

Installing Widget Total Posts and Comments Blog 

If you are interested in this widget, you can install it by following the steps below:


  1. Login with your blog account 
  2. Go to the menu LAYOUT 
  3. Click Add a Gadget, then select the HTML / Javascript 
  4. Copy and paste the script below :

<center><script style="text/javascript">
    function showpostcount(json) {
    document.write('Total Posts : <b>' + parseInt(json.feed.openSearch$totalResults.$t,10)
    + '</b><br>');}</script>
    <script src="http://your-url.blogspot.com/feeds/posts/default?alt=json-in-script&callback=showpostcount"></script><script style="text/javascript"></script>
    <script style="text/javascript">
    function numberOfComments(json) {
    document.write('Total Comments : <b>' + json.feed.openSearch$totalResults.$t +
    '</b><br>');}</script>
    <script src="http://your-url.blogspot.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script></center>

Demo, look my blogger side 

0 comments:

Post a Comment