]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-content/themes/twentyeleven/comments.php
Wordpress 3.5
[autoinstalls/wordpress.git] / wp-content / themes / twentyeleven / comments.php
index 359b001c6c50b15281b6455950597c486451a58e..6b77feeacc4ccc88e1529d462966efb3f3c59645 100644 (file)
                </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(); ?>