Professional Documents
Culture Documents
php
/**
* The template for displaying comments.
*
* This is the template that displays the area of the page that contains both the
current comments
* and the comment form.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Newspaper X
*/
/*
* If the current post is protected by a password and
* the visitor has not yet entered the password we will
* return early without loading the comments.
*/
if ( post_password_required() ) {
return;
}
?>
<?php
// You can start editing here -- including this comment!
if ( have_comments() ) : ?>
<h3 class="comments-title">
<span>
<?php echo __( 'Comments', 'newspaper-x' ) ?>
</span>
</h3>
<div
class="nav-previous"><?php
previous_comments_link( esc_html__( 'Older Comments', 'newspaper-x' ) ); ?></div>
<div class="nav-next"><?php
next_comments_link( esc_html__( 'Newer Comments', 'newspaper-x' ) ); ?></div>
<ol class="comment-list">
<?php
wp_list_comments( array(
'style' => 'ol',
'short_ping' => true,
'avatar_size' => 64,
) );
?>
</ol><!-- .comment-list -->
<div
class="nav-previous"><?php
previous_comments_link( esc_html__( 'Older Comments', 'newspaper-x' ) ); ?></div>
<div class="nav-next"><?php
next_comments_link( esc_html__( 'Newer Comments', 'newspaper-x' ) ); ?></div>
comment_form();
?>
</div>
</div>
</div>
</div><!-- #comments -->