Twenty Twelve: better fix for #20469 and comments closed messages, also 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: https://develop.svn.wordpress.org/trunk@22615 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d0dea25296
commit
13cb0aa9a3
@ -49,7 +49,7 @@ if ( post_password_required() )
|
||||
/* 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 @@ get_header(); ?>
|
||||
<span class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '→', '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. ?>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user