Permalink
Browse files

Twenty Twelve: better fix for #20469 and comments closed messages, al…

…so load the comments template in single.php template regardless of whether comments are open or closed (consistent with page.php). Both props kovshenin.

git-svn-id: http://core.svn.wordpress.org/trunk@22615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent efda148 commit dee2ec47797de1e1d84aaea84391e486bfaa284e @nanobar nanobar committed Nov 16, 2012
Showing with 2 additions and 6 deletions.
  1. +1 −1 wp-content/themes/twentytwelve/comments.php
  2. +1 −5 wp-content/themes/twentytwelve/single.php
@@ -49,7 +49,7 @@
/* If there are no comments and comments are closed, let's leave a note.
* But we only want the note on posts and pages that had comments in the first place.
*/
- if ( ! comments_open() && ! empty( $comments_by_type['comment'] ) ) : ?>
+ if ( ! comments_open() && get_comments_number() ) : ?>
<!-- If comments are closed. -->
<p class="nocomments"><?php _e( 'Comments are closed.' , 'twentytwelve' ); ?></p>
<?php endif; ?>
@@ -22,11 +22,7 @@
<span class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentytwelve' ) . '</span>' ); ?></span>
</nav><!-- .nav-single -->
- <?php
- // If comments are open or we have at least one comment, load up the comment template
- if ( comments_open() || '0' != get_comments_number() )
- comments_template( '', true );
- ?>
+ <?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>

0 comments on commit dee2ec4

Please sign in to comment.