web/wp-content/themes/twentyeleven/comments.php
changeset 204 09a1c134465b
parent 194 32102edaa81b
--- a/web/wp-content/themes/twentyeleven/comments.php	Wed Dec 19 12:35:13 2012 -0800
+++ b/web/wp-content/themes/twentyeleven/comments.php	Wed Dec 19 17:46:52 2012 -0800
@@ -63,14 +63,15 @@
 		</nav>
 		<?php endif; // check for comment navigation ?>
 
-	<?php
+		<?php
 		/* If there are no comments and 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.
+		 * But we only want the note on posts and pages that had comments in the first place.
 		 */
-		elseif ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) :
-	?>
-		<p class="nocomments"><?php _e( 'Comments are closed.', 'twentyeleven' ); ?></p>
-	<?php endif; ?>
+		if ( ! comments_open() && get_comments_number() ) : ?>
+		<p class="nocomments"><?php _e( 'Comments are closed.' , 'twentyeleven' ); ?></p>
+		<?php endif; ?>
+
+	<?php endif; // have_comments() ?>
 
 	<?php comment_form(); ?>