forked from jonmbennett/betheme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomments.php
44 lines (37 loc) · 1.27 KB
/
comments.php
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
<?php
/**
* The template for displaying Comments.
*/
?>
<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.', 'betheme' ); ?></p>
</div>
<?php return;
endif; ?>
<?php if ( have_comments() ) : ?>
<h4 id="comments-title">
<?php
if( get_comments_number() == 1 ){
echo get_comments_number() .' '. __('Comment','betheme');
} else {
echo get_comments_number() .' '. __('Comments','betheme');
}
?>
</h4>
<ol class="commentlist">
<?php wp_list_comments('avatar_size=64'); ?>
</ol>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav">
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'betheme' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'betheme' ) ); ?></div>
</nav>
<?php endif; ?>
<?php
elseif ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
<p class="nocomments"><?php _e( 'Comments are closed.', 'betheme' ); ?></p>
<?php endif; ?>
<?php comment_form(); ?>
</div><!-- #comments -->