Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tag: 0.3
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (32 sloc) 1.861 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 Live Wire
* @subpackage Template
* @since 0.1.0
* @note This is taken from My Life Theme
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2011, Justin Tadlock
* @link http://themehybrid.com/themes/my-life
* @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">&larr;</span> Return to entry', 'live-wire' ) . '</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">&larr;</span> Previous', 'live-wire' ) . '</span>' ); ?>
<?php next_post_link( '%link', '<span class="next">' . __( 'Next <span class="meta-nav">&rarr;</span>', 'live-wire' ) . '</span>' ); ?>
</div><!-- .loop-nav -->
<?php elseif ( !is_singular() && current_theme_supports( 'loop-pagination' ) ) : loop_pagination( array( 'prev_text' => __( '<span class="meta-nav">&larr;</span> Previous', 'live-wire' ), 'next_text' => __( 'Next <span class="meta-nav">&rarr;</span>', 'live-wire' ) ) ); ?>
<?php elseif ( !is_singular() && $nav = get_posts_nav_link( array( 'sep' => '', 'prelabel' => '<span class="previous">' . __( '<span class="meta-nav">&larr;</span> Previous', 'live-wire' ) . '</span>', 'nxtlabel' => '<span class="next">' . __( 'Next <span class="meta-nav">&rarr;</span>', 'live-wire' ) . '</span>' ) ) ) : ?>
<div class="loop-nav">
<?php echo $nav; ?>
</div><!-- .loop-nav -->
<?php endif; ?>
Jump to Line
Something went wrong with that request. Please try again.