Add comment navigation template tags
This commit is contained in:
parent
ef422bc160
commit
8e67439859
2 changed files with 138 additions and 212 deletions
25
comments.php
25
comments.php
|
@ -45,17 +45,7 @@ if ( post_password_required() ) {
|
|||
?>
|
||||
</h2><!-- .comments-title -->
|
||||
|
||||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
|
||||
<nav id="comment-nav-above" class="navigation comment-navigation">
|
||||
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', '_s' ); ?></h2>
|
||||
<div class="nav-links">
|
||||
|
||||
<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', '_s' ) ); ?></div>
|
||||
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', '_s' ) ); ?></div>
|
||||
|
||||
</div><!-- .nav-links -->
|
||||
</nav><!-- #comment-nav-above -->
|
||||
<?php endif; // Check for comment navigation. ?>
|
||||
<?php the_comments_navigation(); ?>
|
||||
|
||||
<ol class="comment-list">
|
||||
<?php
|
||||
|
@ -66,18 +56,7 @@ if ( post_password_required() ) {
|
|||
?>
|
||||
</ol><!-- .comment-list -->
|
||||
|
||||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
|
||||
<nav id="comment-nav-below" class="navigation comment-navigation">
|
||||
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', '_s' ); ?></h2>
|
||||
<div class="nav-links">
|
||||
|
||||
<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', '_s' ) ); ?></div>
|
||||
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', '_s' ) ); ?></div>
|
||||
|
||||
</div><!-- .nav-links -->
|
||||
</nav><!-- #comment-nav-below -->
|
||||
<?php
|
||||
endif; // Check for comment navigation.
|
||||
<?php the_comments_navigation();
|
||||
|
||||
endif; // Check for have_comments().
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue