How to Display Total Posts and Total Comments on your Blog






Follow these steps to Display Total Posts and Total Comments on your Blog.

1.Sign in to your blog using this link http://www.blogger.com

2.Click on  "Design".

3.Click on "Add a Gadget".

4."Add a Gadget" window will now open.

5. Select "Html/Javascript".


6.Name the Title as if you need or leave it blank.

7.Copy and Paste or write the below Javascript code in content section .


<script style="text/javascript">
function totalPosts(json) {
document.write('Total Posts:<b>' + json.feed.openSearch$totalResults.$t + '</b><br>');
}
function totalComments(json) {
document.write('Total Comments: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');
}
</script>
<script src=" /feeds/posts/default?alt=json-in-script&callback=totalPosts"></script>
<script src=" /feeds/comments/default?alt=json-in-script&callback=totalComments"></script>



8.Now Click on "Save" Button.

Just Open your Blog and check it... Now it will Display the Total Posts and Total Comments of your blog...


Responses

0 Respones to "How to Display Total Posts and Total Comments on your Blog"

Post a Comment

Do you have any Question regarding this post? Then Post as a COMMENT...

BestZone

 

Our Visitors

Go to top