How To Add A Popular Post Widget (Most Commented) In Blogger

How To Add A Popular Post Widget (Most Commented) In Blogger | Blogging In Web 2.0 Beta
Popular Post Widget is a good way to attract readers & visitors. This hack works with the most commented posts the maximum no of comments have a post will be on the top of our popular post widget.

For this there is a simple thing we have to do Go to layout of your blog section. Stay on page elements. Click on "Add a Gadget" Now click on "Html/Java Script". When a popup window opens than copy & paste the below code into the empty box.

<script type="text/javascript">
function pipeCallback(obj) {
document.write('<ol style="text-transform: capitalize;">');
var i;
for (i = 0; i < obj.count ; i++)
{
var href = "'" + obj.value.items[i].link + "'";
var item = "<li>" + "<a href=" + href + ">" + obj.value.items[i].title + "</a> </li>";
document.write(item);
}
document.write('</ol>');
}
</script>
<script src="http://pipes.yahoo.com/pipes/pipe.run?_render=json&_callback=pipeCallback&_id=1cf38ae68efbe859c4ba1ee239cec099&url=http%3A%2F%2FYOUR-BLOG-NAME.blogspot.com&num=10" type="text/javascript"></script>

Please don't forget to change the YOUR-BLOG-NAME with your actual blog name. Click On save And We have Done with our new Widget Called "Popular post " .You can name this widget as per your choice like "Popular post ", "Most visited" or "most Commented"

Please Don't Forget To leave your Valuable Comments.

Related Posts by Categories



If Your Enjoyed this Article

Then you May Also Interested In Receiving Updated By Mail:

Enter your email address:-

11 comments:

L. Venkata Subramaniam said...

wow excellent tip...a bit complicated though....lets see if I can actually carry it out

Abner Fan said...

thank you very much

mariandevotee said...

thanks!!!!!!!!mwahhhhh

Gurpreet Singh said...

Your Are Always Welcomed

_neo_ said...

i cant make it. how?

Gurpreet Singh said...

Hello neo Yes You can Do This Just Follow The Steps in Post & You Have Done With This Hack

hananke said...

Thank you, this works great. How do I change it so that it lists the top 5 most commented instead of top 10?
Do I simply change the number 10 in the last line to a 5?

Gurpreet Singh said...

Yes Hananke Please &num=10 to &num=5

Rafay Baloch said...

Learn Hacking
www.rafayhackingarticles.blogspot
Nice post
For author:Lets have a link exchange you put my link on your blogroll and ill put it on yours

Insider-Insights said...

hi..i cant make it work? what's the part i need to edit or put my blog name? can you check my site?only the title appears. thanks http://insider-insights.blogspot.com/

Gurpreet Singh said...

@Insider-Insights
Its absolute working. I write a tip only after testing.I visited your Blog but not found any widget installed about most popular post. try it again change the YOUR-BLOG-NAME in given code as original blog URL and I think this will solve your problem.

Post a Comment