Preview: comments.php
Size: 2.17 KB
/home/jambtst2015/public_html/qasandra.com/wp-content/themes/helo/comments.php
<?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://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package helo
* @since helo 1.0.0
*/
/*
* If the current post is protected by a password and
* the visitor has not yet entered the password,
* return early without loading the comments.
*/
if ( post_password_required() ) {
return;
}
$helo_comment_count = get_comments_number();
?>
<div id="comments" class="comments-area <?php echo get_option( 'show_avatars' ) ? 'show-avatars' : ''; ?>">
<?php
if ( have_comments() ) :
?>
<h2 class="comments-title">
<?php if ( '1' === $helo_comment_count ) : ?>
<?php esc_html_e( '1 comment', 'helo' ); ?>
<?php else : ?>
<?php
printf(
/* translators: %s: Comment count number. */
esc_html( _nx( '%s comment', '%s comments', $helo_comment_count, 'Comments title', 'helo' ) ),
esc_html( number_format_i18n( $helo_comment_count ) )
);
?>
<?php endif; ?>
</h2><!-- .comments-title -->
<ol class="comment-list">
<?php
wp_list_comments(
array(
'avatar_size' => 40,
'style' => 'ol',
'short_ping' => true,
)
);
?>
</ol><!-- .comment-list -->
<?php
the_comments_pagination(
array(
'before_page_number' => esc_html__( 'Page', 'helo' ) . ' ',
'mid_size' => 0,
'prev_text' => sprintf(
'<i class="%s" aria-hidden="true"></i>',
is_rtl() ? 'ti-arrow-right' : 'ti-arrow-left'
),
'next_text' => sprintf(
'<i class="%s" aria-hidden="true"></i>',
is_rtl() ? 'ti-arrow-left' : 'ti-arrow-right'
),
)
);
?>
<?php if ( ! comments_open() ) : ?>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'helo' ); ?></p>
<?php endif; ?>
<?php endif; ?>
<?php
comment_form(
array(
'logged_in_as' => null,
'title_reply' => esc_html__( 'Leave a comment', 'helo' ),
'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">',
'title_reply_after' => '</h2>',
)
);
?>
</div><!-- #comments -->
Directory Contents
Dirs: 4 × Files: 17