Repository navigation
Expand file tree
/
Copy pathcomments.php
More file actions
executable file
·44 lines (35 loc) · 1.83 KB
/
Copy pathcomments.php
File metadata and controls
executable file
·44 lines (35 loc) · 1.83 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
<div id="comments">
<?php if ( post_password_required() ) : ?>
<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'base' ); ?></p>
</div><!-- #comments -->
<?php return; endif; ?>
<?php if ( have_comments() ) : ?>
<h2 id="comments-title">
<?php
printf( _n( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'base' ),
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
?>
</h2>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-above">
<h1 class="assistive-text"><?php _e( 'Comment navigation', 'base' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'base' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'base' ) ); ?></div>
</nav>
<?php endif; // check for comment navigation ?>
<ol class="commentlist">
<?php wp_list_comments( array( 'callback' => 'base_comments' ) ); ?>
</ol>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
<nav id="comment-nav-below">
<h1 class="assistive-text"><?php _e( 'Comment navigation', 'base' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'base' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'base' ) ); ?></div>
</nav>
<?php endif; // check for comment navigation ?>
<?php if ( ! comments_open() && get_comments_number() ) : ?>
<p class="nocomments"><?php _e( 'Comments are closed.' , 'base' ); ?></p>
<?php endif; ?>
<?php endif; // have_comments() ?>
<?php comment_form(); ?>
</div><!-- #comments -->