How to add a widget to display total posts, comments and online users? Just simply pasting a code in your javascript/HTML widget of your page element can fix the task.You should add the widget for your blogger to enhance clearness of your blogger site
1. Login your Blogger account and click on the design tab
2. Click on add a widget and select HTML/JavaScript gadget from the list at your page element
3. Copy this code and paste it in that gadget
<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><br /> <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><br /> Users online: <b><script type="text/javascript" src="http://fastonlineusers.com/on3.php?d=your website.com"></script></b>
See your widget like this
If you like then please share this Thanks
0 comments:
Click Here To add Comment