WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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().

share|improve this answer
Hi Chip. In which file are those calls invoked? – bob Oct 16 '11 at 21:44
@bob Your theme has several files that control the presentation of various page types (chart). Posts are usually controlled by single.php unless your theme is doing something fancy with custom post types. Inside single.php you should find calls to both of the functions Chip mentioned. You can edit the file and experiment with placement to get what you want. – dgw Oct 17 '11 at 0:10
@bob comment markup is defined in comments.php, which is invoked in the Theme template files via comments_template(). – Chip Bennett Oct 17 '11 at 1:03
Thanks. In my case, the 'comments.php' file is present in the theme I'm building, but wordpress isn't using it. It must be falling back to something, because the comment thread and form are still being displayed. Where is the file that wordpress falls back to for displaying comments? – bob Oct 17 '11 at 1:57
Legacy support (i.e. WordPress using a "fallback" template-part file) has been deprecated, and should not be relied on. Instead, ensure that single.php, page.php, and any other template file from which you wish to call the comments markup includes the <?php comments_template(); ?> template tag, which is what includes the comments markup in the template file. – Chip Bennett Oct 17 '11 at 2:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.