Stop PC Crashes with WinZip System Utilities

Enter your email address:

Thursday, April 15, 2010

ADD TOTAL POSTS AND COMMENTS WIDGET

Many bloggers like to know how many comments and how many posts they have in their blog. Knowing total posts is quite easy as the information is available in blogger Dash Board. But knowing total number of comments is quite difficult especially if the  blog have more than 100 posts.Here we will let you know about a widget that will automatically show total number of posts and total number of comments in a blog. 

You can use this widget to promote your blog in other blogs too. Simply follow the steps given below. I have given separate codes for promoting blogs and for your own use.

FREE BLOGGER JOBS
STEP A
Login to your blogger account >> Layout >> Page Element >> Add Gadget >> HTML / JavaScript

STEP B

For promoting statistics of your blog in other blogs:

Copy the code which is given below that starts from <a and ends in </a> and paste it in HTML / JavaScript box, . Please don’t forget to make some changes like this.

  • Change all three YOUR BLOG URL.blogspot.com with your blog URL or website URL
  • Change YOUR BLOG TITLE with the title of your blog or website.

<a href="http://YOUR BLOG URL.blogspot.com"/><marquee behavior="alternate" direction="left" bgcolor="#CCCCCC" onmouseover="this.stop()" onmouseout="this.start()" scrollamount="2" scrolldelay="50">YOUR BLOG TITLE</marquee><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>
<font color="black"><script src="http://YOUR BLOG URL.blogspot.com/feeds/posts/default?alt=json-in-script&callback=numberOfPosts"></script>
<script src="http://YOUR BLOG URL.blogspot.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script></font><a href="http://businessvartha.blogspot.com/2010/04/add-total-posts-and-comments-widget.html"/><span style="font-size: 80%">Grab this</span></a>

After pasting the above Click Save. You can see the statistics of your blog in any other blog.

For keeping this widget in Own blog: ( As I did here in my blog)

Please follow as I told in Step A, then Copy the code which is given below that starts from <script and ends in </a>  and Paste it there in that HTML / JavaScript box, . Please don’t forget to make some changes like this.

  • Change all two YOUR BLOG URL.blogspot.com with your blog URL or website URL 

<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>
<font color="black"><script src="http://YOUR BLOG URL.blogspot.com/feeds/posts/default?alt=json-in-script&callback=numberOfPosts"></script>
<script src="http://YOUR BLOG URL.blogspot.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script></font><a href="http://businessvartha.blogspot.com/2010/04/add-total-posts-and-comments-widget.html"/><span style="font-size: 80%">Grab this</span></a>

After pasting the above Click Save. Please give the Title of this widget as “Site Statistics” or “Blog Info” or any title as you wish. You can see the statistics of your blog in the same blog itself.

Still have any doubts? Please feel free to ask us.

Happy Blogging.

Recommended Reading…

1 comment:

Affan Ruslan said...

Thanks man.

www.affanruslan.com

Blog Widget by LinkWithin