December 29, 2008

Popular Posts Widgets For Blogger - New and Working


The previous widget for showing Popular posts (most commented), has been stopped working, so here's a new code for the widget.

Steps to follow:

Log in to Blogger
Go to Layout -> Add a Gadget -> HTML/JavaScript

Now copy and paste this code in to the widget:

Widget Style #1

<script type="text/javascript">
function pipeCallback(obj) {
document.write('<ul 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('</ul>');
}
</script>
<script src="http://pipes.yahoo.com/pipes/pipe.run?_render=json&_callback=pipeCallback&_id=28a6afad7c6ba1288c1b738277e42385&url=http%3A%2F%2FYOUR_BLOG_ADDRESS_HERE_WITHOUT_http://&num=10" type="text/javascript"></script>
<a href="http://bloggerstop.net" target="_blank"><span style="font-size: xx-small;">Popular Posts Widget</span></a>

NOTE: REPLACE everything in RED color in the code above with your blog's address without typing http://

The above code displays 10 posts, you can change it by editing the number being displayed in blue !

The above widget code, displays the links/titles like this:

Post one (18)
Post two (14) etc.

If you want to display them like this:

Post one (18 comments)
Post two (14 comments),

then use this code :

Widget Style #2

<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=ML4p0UfW3RGgS7iN1JzWFw&url=http%3A%2F%2FYOUR_BLOG_ADDRESS_WITHOUT_http://&num=10" type="text/javascript"></script>
<span style="font-size: 80%">Widget by <a href="http://www.bloggerstop.net">Blogger Widgets </a></span>

And in case, you want to display the popular posts without the number of comments (as requested by Ben), use this code:

Widget Style #3

<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=097d1b822fc6f356d8376802a911036b&url=http%3A%2F%2FYOUR_BLOG_ADDRESS_WITHOUT_http://&num=10" type="text/javascript"></script>
<span style="font-size: 80%">Widget by <a href="http://www.bloggerstop.net">Blogger Widgets </a></span>

P.S. : Please do not remove the footer link...

220 comments:

«Oldest   ‹Older   201 – 220 of 220   Newer›   Newest»
7on7 said...

Thanks 4 share, it's very useful for a new blogger as me :)

المدون العربي said...
This comment has been removed by the author.
Sherman Unkefer said...

Thank you for the nice widget.
Works perfectly on my blog.

Ping-i said...

Hello, I've added this widget but have some problems with it. For example, my most commented post, which has 42 comments is not included in my list. i also have another post with 35 comments that is not on the list. Could you tell me why? Thanks.

Ahmad Tajuddin Abdullah said...

hi,why it won't working well in my blog?
i meant its word never separate each other....how can i recover it?

i use this in my test blog,http://ata-testblog.blogspot.com

Jenniffer said...

(Jul-29-2011) Hi Divya! I am using your widget to show my most commented posts, but I have noticed that it is not exactly correct. The wisget has my most commented post at 16 comments, but this page:

http://cupadeecakes.blogspot.com/2010/11/how-do-i-get-my-cakes-smooth.html

has 29 comments. Can you explain why it isn't showing as #1? Thank you for your time and helping the blogging community!

All Unique Things said...

This is a really good read for me, Must admit that you are one of the best bloggers I ever saw.Thanks for posting this informative article.

romanticghetto said...

thanks

Alicia said...

I appreciate this and would like to know more about blogs... thanks anyway!

SEO Company Montreal

Naked Girls Photos said...

yes I like it. Firstly I am looking for the javascript. But have available in widget. So crazy me.

Luqman Kusumahdilaga said...

Hi. Your tutorial is very interesting. I got a little problem about the popular post.
Would you help me, please?
Sentence for his post is not popular in my blog comes up.
Please visit my blog at merahmarunluck.blogspot.com so you can see it and give a little of all this problem solving.
Thank you ..

Luqman Kusumahdilaga said...

Hi. Your tutorial is very interesting. But, I've got a little problem about the popular post.
Would you help me, please?
Sentence for his popular post is not comes up in my blog.
Please visit my blog at merahmarunluck.blogspot.com so you can see it and give a little of all this problem solving.
Thank you ..

Guitar chords said...

Is that any way to get our blogger popular post on our pages instead on widget I want to show my most popular articles by view on my pages with more number eg. 50 or 100 most view articles thanks.

Olgun sohbet Odaları said...

lez sohbet odaları
lez sohbet
cinsel sohbet odaları
cinsel sohbet

türkiye sohbet
çet odaları

chat
yetiskin sohbet
denizli sohbet
chat
thnjs

printer ink cartridges said...

thanks for sharing a new & good work thanks

Huyen Lee said...

thank for share demo: http://f69dkm.blogspot.com/

Kelsie Harris said...

The widget is not showing up on my blog for some reason, just the footer. Oh well. Guess I'm off to find a different one.

Ice cream display said...

Hello

I really love the theme on your blog, I run a website as well, and I would love to use this theme. Would you mind telling me what the name of it is....

Andre Meier said...

Hi, Cool stuff. Another Question: I want my most poular blogger posts displayed on a blogger page. I know i can have those managed with labels, so that there's a page with all blogposts with that label. But how can I adopt the sidebar gadget to deliver content on a page? Thanks

Evgeny Masibut said...

> Andre Meier
> I want my most popular blogger posts displayed on a blogger page
There's no an easy way to do that in Blogger. You can try this: http://fruitfulbookmarks-en.blogspot.com/2012/11/how-to-sort-blogger-posts-by-popularity.html. Not based on a widget described in this article though.

«Oldest ‹Older   201 – 220 of 220   Newer› Newest»
:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

comment on this post Share Your Views

Allowed HTML tags: <b>, <i> and <a>

Join and share your views with other bloggers at BloggerStop Community

Comment Like This! and Optimize your blog...

SPAMMER OF THE MONTH: www[.]TopRankLinks[.]com

Next Post Homepage Previous Post

Regular Readers


What They Say...

Divya Sai is the ingenious webmaster of Bloggerstop.Net. Divya is extremely patient, knowledgeable and responsive... Bloggerstop.net has an abundance of articles on creating widgets, templates, hacks and ways to make your blog search engine friendly.
- Stacey @Pets With Allergies
I stumbled onto a great site. Sai, over at Bloggerstop.net has helped me tremendously and with great patience...for any and all questions regarding computer issues. And again, THANK YOU Sai.
- Cheryl @Cmash Loves To Read

More Here...

Popular Posts

Get this widget

| © 2010 BloggerStop.net | Blogger Widgets | Template by Dicas Blogger | Enhanced By Divya Sai | Privacy Policy