web/wp-content/themes/twentyten/comments.php
changeset 204 09a1c134465b
parent 194 32102edaa81b
--- a/web/wp-content/themes/twentyten/comments.php	Wed Dec 19 12:35:13 2012 -0800
+++ b/web/wp-content/themes/twentyten/comments.php	Wed Dec 19 17:46:52 2012 -0800
@@ -62,15 +62,13 @@
 			</div><!-- .navigation -->
 <?php endif; // check for comment navigation ?>
 
-<?php else : // or, if we don't have comments:
-
-	/* If there are no comments and comments are closed,
-	 * let's leave a little note, shall we?
+	<?php
+	/* If there are no comments and comments are closed, let's leave a little note, shall we?
+	 * But we only want the note on posts and pages that had comments in the first place.
 	 */
-	if ( ! comments_open() ) :
-?>
-	<p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p>
-<?php endif; // end ! comments_open() ?>
+	if ( ! comments_open() && get_comments_number() ) : ?>
+		<p class="nocomments"><?php _e( 'Comments are closed.' , 'twentyten' ); ?></p>
+	<?php endif;  ?>
 
 <?php endif; // end have_comments() ?>