the ‘comments are closed’ part is in the elseif part of the if ( have_comments() ) and will therefore only show if the post does not have any comments.
change the relevant section for instance to:
<?php if ( have_comments() ) : ?>
<h1><?php comments_number( 'No Comments Yet', '1 Comment', '% Comments' ); ?></h1>
<ol class="comments">
<?php wp_list_comments( array( 'callback' => 'starkers_comment' ) ); ?>
</ol>
<?php endif; ?>
<?php /* If comments are closed, let's leave a little note, shall we?
* But we don't want the note on pages or post types that do not support comments.
*/
if ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
<h1>Comments are closed</h1>
<?php endif; ?>
That would make a lot of sense haha! Thank you!
(@enfotoad)
12 years, 11 months ago
Hi there!
I’m having trouble with getting the “Comments are closed.” text to appear on a post page. The comment form goes away as desired, but the replacement text doesn’t appear. Here’s the code in my comments.php theme file. Any ideas?