How do I put my comment form above the comments?

The default way to do things seem to have the comment form below the comments. I’d like to have the form at the top. How do I achieve this?

Related posts

Leave a Reply

3 comments

  1. The comment list is output via wp_list_comments(), and the comment-reply form is output via comment_form(); so, just ensure that you call comment_form() before you call wp_list_comments().

  2. I just needed a temporary solution for one of my pages, and I didn’t want to edit my theme files, so I just put this in my page using the “text” tab of the page editor. Maybe it’ll help someone else in a similar situation:

    <script>
    window.addEventListener("DOMContentLoaded", function(){
      var respond = document.querySelector("#respond");
      var commentsArea = respond.parentNode;
      commentsArea.removeChild(respond);
      commentsArea.insertBefore(respond, commentsArea.firstChild);
    });
    </script>