This widget works using javascript ( the json feeds) which calculates the number of comments and posts from your blogs feed , the Atom one and not RSS one
This is only for Blogger
not wordpress or joomla or livejournal as there are many plug-ins available for that !
This code is very light weighted and efficient and does not take any time to load blog slower .
Adding HTML coding requires just a minute to add in Blogger
To add this widget go to
- Layout
- Add a Gadget
- HTML/JAVASCRIPT
add da code shown below
<script src="http://www.qwertyweb.blogspot.com/feeds/posts/default?orderby=published&alt=json-in-script&callback=rp"></script>
<script style="text/javascript">
function numberOfPosts(json) {
document.write('Total number of Posts: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');
}
</script>
<script src="http://www.qwertyweb.blogspot.com/feeds/posts/default?alt=json-in-script&callback=numberOfPosts"></script>
<script src="http://www.qwertyweb.blogspot.com/feeds/comments/default?orderby=published&alt=json-in-script&callback=rp"></script>
<script style="text/javascript">
function numberOfComments(json) {
document.write('Total number of Comments: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');
}
</script>
<script src="http://www.qwertyweb.blogspot.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script>
Just replace qwertyweb by your blog name
0 comments: on "Show posts and comments stats in Blogger"
Post a Comment