Home > tutorial > script popular post
script popular post
Posted on Monday, 18 October 2010 by Admin
Top post is a statistic which shows some popular articles that we have published. Most of top posts are valued from the amount of clicks or the score from many comments. In default, Wordpress has widget to show top post, but how about blogspot? Of course it could, although standard Blogspot doesn’t have it, we also can show it. Top Post in blogspot that will be made later is counted from the amount of comments. This widget is made by a beautiful blogger woman, Amanda Fazani . This woman can be said as a famous blogger tutorial. Even o-om is amazed with her blogging ability :). This top post widget is made with the help from Yahoo Pipes. It can be seen in
Posts/Most Commented Pipe page Commented Pipe page. For more explanations, visit Amanda’s blog disini.
In below, there are some codes that can be immediately used. The method to set the code is easy. It just need to be entered in the new page element:
What do you need to edit?
<script type="text/javascript">
function pipeCallback(obj) {
[removed]('<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>";
[removed](item);
}
[removed]('</ol>');
}
</script>
<script src="http://pipes.yahoo.com/pipes/pipe.run?_render=json&_callback=pipeCallback&_id=1cf38ae68efbe859c4ba1ee239cec099&url=http://namablog.blogspot.com&num=10" type="text/javascript"></script>
<span style="font-size: 80%">Widget by <a href="http://share-any.blogspot.com/">Bagi bagi </a></span>
Blogname.blogspot.com: Change it with your own blog name
Num=10 : Maximum amount of Top posts that you want to show
For the custom domain, just use www.yourdomain.com
Category Article tutorial