Archived topic
Move the leave a comment box Above the Comments
1 reply · Started by Sarina on November 17, 2022
I would like to move the comment box above the rest of the comments
When i try the method of pasting the comment box code
<?php
endif;
comment_form();
?>
in the comments.php of child theme there is a problem.
May be because the location I paste it is is wrong, or because the code i cut out is wrong, the layout of the post changes
Please give me a better option
I have the child theme with the comments.php
I do not know what to change :)
Hi Sarina,
You should need to alter the template itself. You can do it through custom CSS.
Can you revert comments.php to its original state, and then add this through Appearance > Customize > Additional CSS:
div#comments {
display: flex;
flex-direction: column;
}
div#respond {
order: -1;
}
Otherwise, if you want to alter the template, try moving comment_form(); after this line: do_action( 'generate_inside_comments' );