Files
dis-2019/comments.php
2019-06-04 19:35:01 +02:00

25 lines
620 B
PHP

<div class="comments">
<?php if (post_password_required()) : ?>
<p><?php _e( 'Post is password protected. Enter the password to view any comments.', 'dis2019' ); ?></p>
</div>
<?php return; endif; ?>
<?php if (have_comments()) : ?>
<h2><?php comments_number(); ?></h2>
<ul>
<?php wp_list_comments('type=comment&callback=dis2019comments'); // Custom callback in functions.php ?>
</ul>
<?php elseif ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) : ?>
<p><?php _e( 'Comments are closed here.', 'dis2019' ); ?></p>
<?php endif; ?>
<?php comment_form(); ?>
</div>