コメント投稿フォーム
WordPressでコメント投稿フォームを表示するには、
comments.phpに、
<?php if ( have_comments() ) : ?> <div id="comments" class="container"> <h3>Comments</h3> <ul> <?php wp_list_comments( array( 'format' => 'html5' ) ); ?> </ul> </div> <?php endif; ?> <?php comment_form( array( 'title_reply' => 'Leave a comment', 'label_submit' => '送信', 'format' => 'html5' ) ); ?>
を記述して、
記事ページの、
<?php comments_template(); ?>
で呼び出す。
コメントを残す