16 lines
871 B
PHP
16 lines
871 B
PHP
<?php
|
|
// Protected posts must not expose their discussion until WordPress grants access.
|
|
if ( post_password_required() ) { return; }
|
|
?>
|
|
<section id="comments" class="comments-area">
|
|
<?php if ( have_comments() ) { ?>
|
|
<h2 class="comments-title"><?php echo esc_html( get_comments_number_text() ); ?></h2>
|
|
<?php // The custom callback uses an avatar-led, non-numbered discussion layout. ?>
|
|
<ol class="comment-list"><?php wp_list_comments( array( 'style' => 'ol', 'short_ping' => true, 'avatar_size' => 44, 'callback' => 'c1024_2026_comment' ) ); ?></ol>
|
|
<?php the_comments_navigation(); ?>
|
|
<?php } ?>
|
|
<?php if ( ! comments_open() && get_comments_number() ) { ?><p><?php esc_html_e( 'Comments are closed.', 'c1024-2026' ); ?></p><?php } ?>
|
|
<?php // WordPress provides the form so it respects discussion settings and logged-in state.
|
|
comment_form(); ?>
|
|
</section>
|