| This entry was posted by Gautam on May 2, 2009 at 10:15 pm, and is filed under blogger. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
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:
To add this widget follow these simple steps:
1.Go to Layout>Page Elements
2.Then click on Add Gadget

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.
Gautam Hans is a freelance blogger and the owner of the Blog Godown where he shares Blog Tips and Social Media Marketing Tips. Check out his Wordpress and Social Media Marketing services. You can follow him on Twitter: @virtuosoblogger Facebook: gautamhans
| This entry was posted by Gautam on May 2, 2009 at 10:15 pm, and is filed under blogger. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |

about 2 years ago
Hey, what a simple yet awesome piece of code!! Thanks!!
I have it up on my site now 
Reply
about 2 years ago
To cool, Thanks!
)
Reply
about 2 years ago
Salam.
Hey that is great. Thank you.
Reply
about 2 years ago
Great i like that… http://houseofraka.blogspot.com
Reply
about 2 years ago
great tip! I did just delete the ‘ ‘ tag to get normal text. But the rest works great.
Thx!
.-= Heiko´s last blog ..Homer Zeitraffer Video & Noah’s Odyssee =-.
Reply
about 1 year ago
doesn’t work for me
.-= m1ha1´s last blog ..spune nu fumatului =-.
Reply
about 1 year ago
As i use Wp i can use some plugins..
Anyway nice find
.-= sudharsan @ technoskillonline´s last blog ..Tips to Boost Pagerank – Next PR update March-April 2010 =-.
Reply
about 1 year ago
I couldn’t get this to work for me on Blogger.
I know the template I am using is troublesome already, but nothing appears when I add the code following your instruction.
StephanieC | Seriously? Reeeeally?? Seriously?´s last [type] ..Sometimes Blogging Is Bullshit
Reply
about 10 months ago
Hello!! can you tell me …How can i get the total number of posts per label on blogger?
thank you
Deme.
Deme´s last [type] ..θαυματρόπιο – Ερμηνεία
Reply
about 8 months ago
nice……
but what is the code for individual post?
vishnu´s last [type] ..Better Facebook -Add great enhancements and functionality to Facebook !
Reply