Repository navigation
Expand file tree
/
Copy pathcomments.php
More file actions
47 lines (38 loc) · 1.58 KB
/
Copy pathcomments.php
File metadata and controls
47 lines (38 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
if ( post_password_required() ) {
return;
}
?>
<div id="comments" class="comments-area">
<?php if ( have_comments() ) : ?>
<header>
<h2 class="comments-title"><?php comments_number( 'No Responses', 'One Response', '% Responses' ); ?></h2>
</header>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
<nav id="comment-nav-above" class="comment-navigation" role="navigation">
<h1 class="screen-reader-text">Comment navigation</h1>
<div class="nav-previous"><?php previous_comments_link( '← Older Comments' ); ?></div>
<div class="nav-next"><?php next_comments_link( 'Newer Comments →' ); ?></div>
</nav><!-- #comment-nav-above -->
<?php endif; ?>
<ol class="comment-list">
<?php
wp_list_comments( array(
'style' => 'ol',
'short_ping' => true,
) );
?>
</ol><!-- .comment-list -->
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
<nav id="comment-nav-below" class="comment-navigation" role="navigation">
<h1 class="screen-reader-text">Comment navigation</h1>
<div class="nav-previous"><?php previous_comments_link( '← Older Comments' ); ?></div>
<div class="nav-next"><?php next_comments_link( 'Newer Comments →' ); ?></div>
</nav><!-- #comment-nav-below -->
<?php endif; ?>
<?php endif; ?>
<?php if ( ! comments_open() && '0' !== get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>
<p class="no-comments">Comments are closed.</p>
<?php endif; ?>
<?php comment_form(); ?>
</div><!-- #comments -->