查看渲染comment_form
. 您可以在页面模板中的任何位置呈现它,有很多方法可以自定义它。
$comments_args = array (
// change the title of send button
\'label_submit\' => \'Send\',
// change the title of the reply section
\'title_reply\' => \'Leave Your Comment\',
// remove "Text or HTML to be displayed after the set of comment fields"
\'comment_notes_after\' => \'\',
// redefine your own textarea (the comment body)
\'comment_field\' => \'<p class="comment-form-comment"><label for="comment">\' . _x( \'Comment\', \'noun\' ) . \'</label><br /><textarea id="comment" name="comment" aria-required="true"></textarea></p>\',
);
comment_form( $comments_args );