Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 39 lines (31 sloc) 1.807 kb
e3fb7cf2 »
2012-09-03 Loads of fun, new stuff. Plus, random backgrounds.
1 <?php
2 /**
3 * Loop Nav Template
4 *
5 * This template is used to show your your next/previous post links on singular pages and
6 * the next/previous posts links on the home/posts page and archive pages.
7 *
8 * @package Unique
9 * @subpackage Template
10 * @since 0.1.0
11 * @author Justin Tadlock <justin@justintadlock.com>
12 * @copyright Copyright (c) 2012, Justin Tadlock
13 * @link http://themeforest.net/user/greenshady
14 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
15 */
16 ?>
17
18 <?php if ( is_attachment() && 0 < get_queried_object()->post_parent ) : ?>
19
20 <div class="loop-nav">
21 <?php previous_post_link( '%link', '<span class="previous">' . __( '<span class="meta-nav">&larr;</span> Return to entry', 'unique' ) . '</span>' ); ?>
22 </div><!-- .loop-nav -->
23
24 <?php elseif ( is_singular( 'post' ) ) : ?>
25
26 <div class="loop-nav">
27 <?php previous_post_link( '%link', '<span class="previous">' . __( '<span class="meta-nav">&larr;</span> Previous', 'unique' ) . '</span>' ); ?>
28 <?php next_post_link( '%link', '<span class="next">' . __( 'Next <span class="meta-nav">&rarr;</span>', 'unique' ) . '</span>' ); ?>
29 </div><!-- .loop-nav -->
30
31 <?php elseif ( !is_singular() && current_theme_supports( 'loop-pagination' ) ) : loop_pagination( array( 'prev_text' => __( '<span class="meta-nav">&larr;</span> Previous', 'unique' ), 'next_text' => __( 'Next <span class="meta-nav">&rarr;</span>', 'unique' ) ) ); ?>
32
33 <?php elseif ( !is_singular() && $nav = get_posts_nav_link( array( 'sep' => '', 'prelabel' => '<span class="previous">' . __( '<span class="meta-nav">&larr;</span> Previous', 'unique' ) . '</span>', 'nxtlabel' => '<span class="next">' . __( 'Next &rarr;', 'unique' ) . '</span>' ) ) ) : ?>
34
35 <div class="loop-nav">
36 <?php echo $nav; ?>
37 </div><!-- .loop-nav -->
38
39 <?php endif; ?>
Something went wrong with that request. Please try again.