/
comments.php
36 lines (27 loc) · 1.24 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
<?php // Do not delete these lines
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');
if ( post_password_required() ) { ?>
<p class="nocomments">This post is password protected. Enter the password to view comments.</p>
<?php return; } ?>
<?php if ( have_comments() ) : ?>
<h2 id="comments" class="title"><?php comments_number('No Responses', 'One Response', '% Responses' );?> to “<?php the_title(); ?>”</h2>
<ul class="navigation">
<li class="alignleft"><?php previous_comments_link() ?></li>
<li class="alignright"><?php next_comments_link() ?></li>
</ul>
<ol class="commentlist">
<?php wp_list_comments('callback=base_comment'); ?>
</ol>
<ul class="navigation">
<li class="alignleft"><?php previous_comments_link() ?></li>
<li class="alignright"><?php next_comments_link() ?></li>
</ul>
<?php else : // this is displayed if there are no comments so far ?>
<?php if ('open' == $post->comment_status) : ?>
<!-- <p>No comments yet. <a href="#respond">Post one »</a>.</p> -->
<?php else : // comments are closed ?>
<p class="nocomments">Comments are closed.</p>
<?php endif; ?>
<?php endif; ?>
<?php comment_form(); ?>