How To Show Popular Posts (Most Commented Blog Posts)

Popular posts are your most commented blog posts. Showing off your popular posts is definitely a way to keep visitors longer, one of the displayed post might have gone into archive but still pretty much relevant. Who knows, some of your visitors might still be in need of it.

Displaying popular posts on your blogspot site needs no special HTML knowledge and you don’t even need to edit your template html manually. Follow the steps below and implement any of the given codes on your blog depending on your taste:

1. Login to your blog and click on “Design”

2. Depending on where you want to display this widget, click on “Add a Gadget”

3. Select HTML/JavaScript

4. To display the posts in this format

My Blog Post A (10 comment)
My Blog Post B (9 comments)
My Blog Post C (8 comments)

<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=7" type="text/javascript"></script>

<a href="http://www.doncaprio.com" target="_blank"><span style="font-size: xx-small;">Popular Posts Widget</span></a>

To display in this format:

My Blog Post A (10)
My Blog Post B (9)
My Blog Post C (8)

<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=7" type="text/javascript"></script>

<a href="http://www.doncaprio.com" target="_blank"><span style="font-size: xx-small;">Popular Posts Widget</span></a>

To display without number of comments like this:

My Blog Post A
My Blog Post B
My Blog Post C


<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=7" type="text/javascript"></script>

<a href="http://www.doncaprio.com" target="_blank"><span style="font-size: xx-small;">Popular Posts Widget</span></a>

5. The number “7″ shown in blue determines the number of posts that will be shown. You can change to whatever number you like.

Also, make sure you completely replace the area in the code shown in red with your blog’s address without “http://”!

The widget works perfectly and if it doesn’t, I suggset you take a look at your blog address in the code.

Get free daily updates through email

avatar About Don Caprio

Don Caprio is a full time blogger / web designer living in Nigeria and apart from blogging, my other obsession is music. I'm a self-confessed Tupac fan, an iOS lover, an Android user, a Windows 8 power user, a writer with a 5-year old unfinished novel... and the list goes on and on. You can add me on Facebook, follow my updates on Twitter or add me to your circles on ! You can as well grab my feed and get updates through email.

Comments

  1. avatar stock tips says:

    It was a awe-inspiring post and it has a significant meaning and thanks for sharing the information.Would love to read your next post too……
    Thanks
    Regards
    Stock Tips

  2. avatar Share Tips says:

    It was a very nice idea! Just wanna say thank you for the information you have shared. Just continue writing this kind of post. I will be your loyal reader. Thanks again.

    Share Tips

  3. thanx for this tutorial post & html script.its so much useful to me.

  4. avatar sellnfl says:

    I wanna say something,especially if I read a post that really grabs my attention. However, I won’t do it for the sake of doing it.wholesale soccer jerseysI just think that I really like in your article point of view.

  5. avatar Fiverr Affiliate says:

    Great stuff from you, man. Ive read your stuff before and your just too awesome. I love what you’ve got here, love what your saying and the way you say it. You make it entertaining and you still manage to keep it smart. I cant wait to read more from you. this is really a great blog.
    http://franksaffiliatemarketing.com/make-money-with-fiverr/

  6. A very good blog of various systematic criteria that we clarify doubts over life!Your so cool! I dont suppose Ive learn something like this before. So good to find any individual with some authentic thoughts on this subject. http://imakemoneywithfiver.com/

  7. I like the helpful information you provide for your articles. I’ll bookmark your weblog and check again here frequently. I am quite sure I’ll learn many new stuff proper here! Best of luck for the following!http://www.youtube.com/watch?v=f1B_RHw57C8

  8. avatar eagles513 says:

    physical activity is any Cheap Steelers Jerseys form movement that causes your body to use enegy. it may be purposeful. such as when you exercise or play sports. it may also occur as part of your regular routine, for example,as you are walking or riding bike to go to school,Aaron Smith Jersey you are doing the physical activity. many forms of physical activity can improve your physical fitness, the ability to carry out daily tasks easily and have enough reserve energy to respond to unexpected demands. maintaining a high level of physical fitness gives you a sense of Ben Roethlisberger Jersey total well-being and is an important lifelong health goal.
    Official Eagles Jerseys
    Eagles Throwback Jerseys
    Kids Eagles Jerseys
    Womens Eagles Jerseys

  9. Good information shared on showing the popular comments..

  10. nice tutorial great share…

    will try it in my blog.

    thanks
    Oemar recently posted..Cita-Cita, Harapan dan ImpianMy Profile

  11. Nice tips for blog post. Is there a plugin for wordpress.org.
    Best regards
    Sporting Goods World
    Sporting Goods recently posted..Mongoose SalvoMy Profile

  12. Cheers author for your rocking discussed to script.

  13. Very nice and helpful information has been given in this article. I like the way you explain the things. Keep posting. Thanks..

Speak Your Mind

*

CommentLuv badge