• Hi all,

    I’m using the 2013 theme.

    I have set discussion to turn off comments for all posts over 30 days.

    However, after this date – in each post it closes comments, but does not display a ‘comments closed’ message.

    How do I code the template so a useful message appears?

    <?php
    			// Are there comments to navigate through?
    			if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
    		?>
    		<nav class="navigation comment-navigation" role="navigation">
    			<h1 class="screen-reader-text section-heading"><?php _e( 'Comment navigation', 'twentythirteen' ); ?></h1>
    			<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentythirteen' ) ); ?></div>
    			<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentythirteen' ) ); ?></div>
    		</nav><!-- .comment-navigation -->
    		<?php endif; // Check for comment navigation ?>
    
    		<?php if ( comments_open() && get_comments_number() ) : ?>
    		<p class="no-comments"><?php _e( 'Comments are closed.' , 'twentythirteen' ); ?></p>
    		<?php endif; ?>
    
    	<?php endif; // have_comments() ?>
    
    	<?php comment_form(); ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator t-p

    (@t-p)

    I believe the ‘comments closed’ message is displayed only if a post has no comments.

    Thread Starter callender

    (@jimcallender)

    Hi Tara, thanks for the message – no this is not the case – I have added and removed comments in wp admin, and still the ‘comments are closed’ message does not appear.

    I have not edited the comments.php template.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Comments automatically closed – not showing 'closed message in post' – blank’ is closed to new replies.