-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathloop-nav.php
executable file
·39 lines (31 loc) · 1.74 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
38
39
<?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 Murmur
* @subpackage Functions
* @version 0.1.0
* @author Tung Do <[email protected]>
* @copyright Copyright (c) 2012, Tung Do
* @link http://devpress.com/themes/murmur
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
?>
<?php if ( is_attachment() ) : ?>
<div class="loop-nav">
<?php previous_post_link( '%link', '<span class="previous">' . __( '<span class="meta-nav">←</span> Return to entry', 'murmur' ) . '</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', 'murmur' ) . '</span>' ); ?>
<?php next_post_link( '%link', '<span class="next">' . __( 'Next <span class="meta-nav">→</span>', 'murmur' ) . '</span>' ); ?>
</div><!-- .loop-nav -->
<?php elseif ( !is_singular() && current_theme_supports( 'loop-pagination' ) ) : loop_pagination( array( 'prev_text' => __( '<span class="meta-nav">←</span> Previous', 'murmur' ), 'next_text' => __( 'Next <span class="meta-nav">→</span>', 'murmur' ) ) ); ?>
<?php elseif ( !is_singular() && $nav = get_posts_nav_link( array( 'sep' => '', 'prelabel' => '<span class="previous">' . __( '<span class="meta-nav">←</span> Previous', 'murmur' ) . '</span>', 'nxtlabel' => '<span class="next">' . __( 'Next →', 'murmur' ) . '</span>' ) ) ) : ?>
<div class="loop-nav">
<?php echo $nav; ?>
</div><!-- .loop-nav -->
<?php endif; ?>