-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloop-nav.php
More file actions
34 lines (26 loc) · 1.37 KB
/
Copy pathloop-nav.php
File metadata and controls
34 lines (26 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/**
* Loop Nav Template
*
* This template is used to show your your next/previous post links on singular pages and
* the next/previous posts links on the home/posts page and archive pages.
*
* @package happystraps
* @subpackage Template
*/
?>
<?php if ( is_attachment() ) : ?>
<div class="loop-nav btn-toolbar">
<?php previous_post_link( '%link', '<span class="previous pager">' . __( '← Return to entry', hybrid_get_textdomain() ) . '</span>' ); ?>
</div><!-- .loop-nav -->
<?php elseif ( is_singular( 'post' ) ) : ?>
<div class="loop-nav btn-toolbar">
<?php previous_post_link( '<div class="previous pager">' . __( '%link', hybrid_get_textdomain() ) . '</div>', 'Previous Entry: %title' ); ?>
<?php next_post_link( '<div class="next pager">' . __( '%link', hybrid_get_textdomain() ) . '</div>', 'Next Entry: %title' ); ?>
</div><!-- .loop-nav -->
<?php elseif ( !is_singular() && current_theme_supports( 'loop-pagination' ) ) : loop_pagination(); ?>
<?php elseif ( !is_singular() && $nav = get_posts_nav_link( array( 'sep' => '', 'prelabel' => '<span class="previous pager">' . __( '← Previous', hybrid_get_textdomain() ) . '</span>', 'nxtlabel' => '<span class="next pager">' . __( 'Next →', hybrid_get_textdomain() ) . '</span>' ) ) ) : ?>
<div class="loop-nav btn-toolbar">
<?php echo $nav; ?>
</div><!-- .loop-nav -->
<?php endif; ?>