Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 2df5b64fee
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (29 sloc) 1.478 kB
<?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 Prototype
* @subpackage Template
*/
global $wp_query;
?>
<nav id="nav-below">
<?php if ( is_single() ) : // navigation links for single posts ?>
<?php previous_post_link( '<div class="nav-previous">%link</div>', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', bareskin_get_textdomain() ) . '</span> %title' ); ?>
<?php next_post_link( '<div class="nav-next">%link</div>', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', bareskin_get_textdomain() ) . '</span>' ); ?>
<?php elseif ( $wp_query->max_num_pages > 1 && ( is_home() || is_archive() || is_search() ) ) : // navigation links for home, archive, and search pages ?>
<?php if ( function_exists( 'wp_pagenavi' ) ): ?>
<?php wp_pagenavi(); ?>
<?php else: ?>
<?php if ( get_next_posts_link() ) : ?>
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', bareskin_get_textdomain() ) ); ?></div>
<?php endif; ?>
<?php if ( get_previous_posts_link() ) : ?>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', bareskin_get_textdomain() ) ); ?></div>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
</nav><!-- #nav-below -->
Jump to Line
Something went wrong with that request. Please try again.