3 * The template for displaying comments
5 * This is the template that displays the area of the page that contains both the current comments
6 * and the comment form.
8 * @link https://codex.wordpress.org/Template_Hierarchy
11 * @subpackage Twenty_Seventeen
17 * If the current post is protected by a password and
18 * the visitor has not yet entered the password we will
19 * return early without loading the comments.
21 if ( post_password_required() ) {
26 <div id="comments" class="comments-area">
29 // You can start editing here -- including this comment!
30 if ( have_comments() ) : ?>
31 <h2 class="comments-title">
33 $comments_number = get_comments_number();
34 if ( '1' === $comments_number ) {
35 /* translators: %s: post title */
36 printf( _x( 'One Reply to “%s”', 'comments title', 'twentyseventeen' ), get_the_title() );
39 /* translators: 1: number of comments, 2: post title */
41 '%1$s Reply to “%2$s”',
42 '%1$s Replies to “%2$s”',
47 number_format_i18n( $comments_number ),
54 <ol class="comment-list">
56 wp_list_comments( array(
60 'reply_text' => twentyseventeen_get_svg( array( 'icon' => 'mail-reply' ) ) . __( 'Reply', 'twentyseventeen' ),
65 <?php the_comments_pagination( array(
66 'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous', 'twentyseventeen' ) . '</span>',
67 'next_text' => '<span class="screen-reader-text">' . __( 'Next', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
70 endif; // Check for have_comments().
72 // If comments are closed and there are comments, let's leave a little note, shall we?
73 if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>
75 <p class="no-comments"><?php _e( 'Comments are closed.', 'twentyseventeen' ); ?></p>
82 </div><!-- #comments -->