Reverse the order in which comments appear Edited

I tried the scripts here:


But the thread is 5 years old and the scripts don't seem work on more recent versions (I am running 5.8.6)


When I put the code in the end of Head Custom HTML, the code appears at the top of every wiki page in an error state, and doesn't render.

2 answers

That part of the answer worked perfectly on my instance 5.8.10

function reverseCommentOrder(){
  $comments = AJS.$('#page-comments'); 



(I added the script tags self as you should do, otherwise the code will appear in the page). If that doesnt work, please provide the error state/error message

I was unable to locate the custom html file anywhere on my PC - searching for Confluence Admin yielded naught.  This is a client-side file, correct?  Where can I find it?

@Panagiotis Karampis Perfect, I looked for something like this.

@Paul Willman No, you find it in the Confluence application:

Go as logged in user with admin permission to General Configuration > Look and Feel > Custom HTML

Click edit and add the Script at At end of the HEAD.


We are not using html code, is there a way to do this without the code?


If I enter just this code, where do I put it?  

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,165 views 2 13
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you