The if (have_comments()) { ... }
checks whether there is any comment on your post, and starts a loop to display them.
The comment_form()
function is responsible to render the comment form. So, if you want to swap their positions, you should swap these two.
But, you should make sure you move both comment_form()
and its arguments ($comments_args
) above the comment loop, since this variable should be defined first, or the default fields will be used.
The easy way to do this is to select the entire <div id="comments" class="comments-area clear-fix">...</div>
, cut it and paste of below the comment_form()
. Pay attention to PHP open and close tags <?php
& ?>
.