-
Notifications
You must be signed in to change notification settings - Fork 0
/
loop-nav.php
executable file
·37 lines (28 loc) · 1.51 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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* Navigation Links 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. It also integrates
* with the WP PageNavi plugin if activated.
*
* @package Hybrid
* @subpackage Template
*/
?>
<?php if ( is_attachment() ) : ?>
<div class="navigation-links">
<?php previous_post_link( '%link', '<span class="previous">' . __( '« Return to entry', hybrid_get_textdomain() ) . '</span>' ); ?>
</div>
<?php elseif ( is_singular( 'post' ) ) : ?>
<div class="navigation-links">
<?php previous_post_link( '%link', '<span class="previous">' . __( '« Previous', hybrid_get_textdomain() ) . '</span>' ); ?>
<?php next_post_link( '%link', '<span class="next">' . __( 'Next »', hybrid_get_textdomain() ) . '</span>' ); ?>
</div><!-- .navigation-links -->
<?php elseif ( !is_singular() && function_exists( 'wp_pagenavi' ) ) : wp_pagenavi(); ?>
<?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">' . __( '« Previous', hybrid_get_textdomain() ) . '</span>', 'nxtlabel' => '<span class="next">' . __( 'Next »', hybrid_get_textdomain() ) . '</span>' ) ) ) : ?>
<div class="navigation-links">
<?php echo $nav; ?>
</div><!-- .navigation-links -->
<?php endif; ?>