Tuesday, November 8, 2011

Displaying total number of posts and comments to blogger


Many old bloggers display their total posts and comments just to show how popular their blog is. You can too add this widget to your blog. The widget looks like this:

Total Posts And Comments Widget

To add this widget follow these simple steps:


1.Go to Layout>Page Elements
2.Then click on Add Gadget



3. Then select HTML/JAVASCRIPT


Html/Javascript

4. To this add the following code:
<script type="text/javascript">
function TotalPosts(json) {
document.write('<b>Total Posts: ' json.feed.openSearch$totalResults.$t '</b>');
}

function TotalComments(json) {
document.write('<b>Total Comments: ' json.feed.openSearch$totalResults.$t '</b>');
}
</script>


<script src="/feeds/posts/default?alt=json-in-script&callback=TotalPosts"></script>
<br/>
<script src="/feeds/comments/default?alt=json-in-script&callback=TotalComments"></script>


5. You can replace the bold part of the code to whatever you like. After editing save the widget and see for yourself.


For Further Reading,
Blog, Blogger, Blogger Tips, Blogging, Blogging Tips, Blogspot Tips

0 comments:

Post a Comment

 

Funny Stuff

Man Behind This Blog

Krrish, currently doing his study, is a part time blogger from Delhi, India.

His areas of Interest are Computers, HTML, Web Designing WordPress and Blogger.

He Loves to work on WordPress, Blogger, PHPBB3, MYBB etc and helps others with Tips and Tricks to make successful websites..

At 99B-Everything About Blogging, he writes about Blogging, SEO, Blogger Tutorials,WordPress Tutorials, Blogger Templates and Making Money online.
He Also Provide services in WordPress Installation, Thesis Theme Customization, Link Building and more..(Portfolio Website coming Soon)
Get Traffic to Your Blogs Free- "Sign Up Today Free... "