Monday, 3 October 2011

Popular Post Widget-Most commented Posts For Bloggers

Popular Post Widget i.e Most commented Posts for blogger as is very great widget to show of your posts,which your readers most liked and expressed there love in comments.You will love to use this widget in your blog for sure.It is very easy to install just have to add small bit of javascript codes to your blog sidebar.

How to install this widget:-

Go to Layout > Add page Element > Html/Javascript

Add the below code there


<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%2Fanshuldudeja.blogspot.com&num=10" type="text/javascript"></script>
<noscript><a href="http://anshuldudeja.blogspot.com" target="_blank">Blogger Hacks</a></noscript>


Change the code in red above with the your blog name and in green to show how many posts you want to display and please don't remove he credit's.Now save it.

Using above codes will show total no of comments in front of posts if you dont wanna show them use below codes


<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=1a1c6e4e6d4f148e3650fda46910e15f&url=http%3A%2F%2Fanshuldudeja.blogspot.com&num=10" type="text/javascript"></script>
<noscript><a href="http://anshuldudeja.blogspot.com" target="_blank">Blogger Hacks</a></noscript>


I hope you will like this widget for sure Enjoy !!!

2 Responses to “Popular Post Widget-Most commented Posts For Bloggers”

Best Business Brands said...
8 March 2012 at 06:41

WordPress Popular Posts is a highly customizable sidebar widget that displays the most popular posts on your blog. ... Additionally, the wpp_gets_views() template tag allows you to retrieve the views count for a particular post. ... List your posts either by comment count, views or average daily views.


lovesports said...
2 April 2014 at 01:36

Hi, I enjoy reading your site! Is it okay if you consider linking to my website on your page? Please email me back.

Thanks!

Cailyn
cailynxxx gmail.com


Post a Comment

All Rights Reserved pkcompany | Blogger Template by pkcompany
Sponsored by pkecompany, clickemag, eMAG