-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathloop-nav.php
22 lines (15 loc) · 1.14 KB
/
loop-nav.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php if ( is_attachment() ) : ?>
<div class="loop-nav">
<?php previous_post_link( '%link', '<span class="previous">' . __( '<span class="meta-nav">←</span> Return to entry', 'bearded' ) . '</span>' ); ?>
</div><!-- .loop-nav -->
<?php elseif ( is_singular( 'post' ) ) : ?>
<div class="loop-nav">
<?php previous_post_link( '%link', '<span class="previous">' . __( '<span class="meta-nav">←</span> Previous', 'bearded' ) . '</span>' ); ?>
<?php next_post_link( '%link', '<span class="next">' . __( 'Next <span class="meta-nav">→</span>', 'bearded' ) . '</span>' ); ?>
</div><!-- .loop-nav -->
<?php elseif ( !is_singular() && current_theme_supports( 'loop-pagination' ) ) : loop_pagination( array( 'prev_text' => __( 'Previous', 'bearded' ), 'next_text' => __( 'Next', 'bearded' ) ) ); ?>
<?php elseif ( !is_singular() && $nav = get_posts_nav_link( array( 'sep' => '', 'prelabel' => '<span class="previous">' . __( 'Previous', 'bearded' ) . '</span>', 'nxtlabel' => '<span class="next">' . __( 'Next', 'bearded' ) . '</span>' ) ) ) : ?>
<div class="loop-nav">
<?php echo $nav; ?>
</div><!-- .loop-nav -->
<?php endif; ?>