331A96E0-3037-43FC-8D93-543B900B11C9

😍 Loving this theme? Download

Please enter at least 3 characters.

Reverse the order of Comments in Blogger - Display Newest to Oldest

By default, Blogger displays older comments first and new ones at the end. Let us reverse the order of blogger comments - show newest to oldest.
Reverse the order of Comments in Blogger - Display Newest to Oldest

display newest to oldest comments in blogger
Good evening my fellow readers, 

From past couple of months, I have been trying to make Blogger commenting system look cool 😎 and beautiful. I have also shared different tricks to customize blogger comment system

Today, I want to reverse the order of comments in blogger as I realized by default blogger displays oldest comments first and newest ones at the bottom.

I had couple of questions:

Can I change the order of comments in blogger? Can I display newer comments first and move old comments at the bottom? Do I need to write extra code of Javascript or manipulate with DOM?

Answer - Yes, it is possible 💪 to sort blogger comments from latest to oldest without writing a single line of Javascript.

Let me show you how.

Sorting Blogger comments from New to Old

Blogger provides some lines of code to display comments. If you open your theme HTML code, you can find this piece of code:

<b:loop values='data:post.comments' var='comment'>

Or,

<b:loop values='data:post.comments where (c =&gt; not c.inReplyTo or c.inReplyTo == 0)' var='comment'>

This line 👆simply loops through each comment for this post. To reverse the order of these comments you'll need a way to indicate you want to loop starting at the most recent comment and work your way through the older comments. But how? There is a way to do it natively in Blogger using reverse HTML tag. 

Add reverse='1' to above code. 

Reverse='1' reverses the default order of comments in blogger and displays latest to oldest.

<b:loop reverse='1' values='data:post.comments' var='comment'>

Or,

<b:loop reverse='1' values='data:post.comments where (c =&gt; not c.inReplyTo or c.inReplyTo == 0)' var='comment'>

That is all. Now your comments are sorted from new to old. Happy Blogging! ✊

Any Questions? Leave a comment below. And do you want me to write more guides on customizing blogger commenting system? If yes, let me know.

Some cool articles to check next - 

Share this post

Explore more articles by Aman Bhattarai

4 comments

Please leave comments related to the content. All comments are highly moderated and visible upon approval.

Comment Shortcodes

  • To insert an image, add [img]image_link[/img]
  • To insert a block of code, add [pre]parsed_code[/pre]
  • To insert a link, add [link=your_link]link_text[/link]
  • To insert a quote, add [quote]quote_text[/quote]
  • To insert a code, add [code]parsed_code[/code]
  1. good
  2. Apa iya
  3. Cuyy
  4. Uyyy
Post a Comment