Wednesday, December 29, 2010

How to Add Popular Posts Widget for Blogger/Blogspot






The Popular Posts gadget will help your readers quickly find out which of your posts have been viewed the most by your readers. The gadget also comes with several different styles and configurations. To add one of the best gadget you have to follow some simple steps given below.

Step 1 : Log in Blogger Account

Step 2 : Go to Design



Step 3 : Now in "Add page Element" Click on "Add a Gadget"



Step 4 : Click on "HTML/JavaScript" and Add the below code there and Save



<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%2Fwww.bdlab.blogspot.com&num=10" type="text/javascript"></script>

No comments:

Post a Comment