Skip to content
This repository
tag: v1.4.1
Fetching contributors…

Cannot retrieve contributors at this time

file 41 lines (34 sloc) 1.604 kb
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 40 41
<?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 Cakifo
* @subpackage Template
*/
?>

<?php if ( is_singular( 'post' ) ) : ?>

<nav class="pagination post-pagination clearfix">
<h3 class="assistive-text"><?php _e( 'Post navigation', 'cakifo' ); ?></h3>
<?php previous_post_link( '%link', '<span class="previous">&larr; %title</span>' ); ?>
<?php next_post_link( '%link', '<span class="next">%title &rarr;</span>' ); ?>
</nav> <!-- .pagination.post-pagination -->

<?php
// Pagination if the theme supports "loop-pagination"
elseif ( ! is_singular() && current_theme_supports( 'loop-pagination' ) ) :

loop_pagination( array(
'before' => '<nav class="pagination loop-pagination"><h3 class="assistive-text">' . __( 'Post navigation', 'cakifo' ) . '</h3>',
'after' => '</nav>',
'mid_size' => 2,
'prev_text' => __( '&larr; Previous', 'cakifo' ),
'next_text' => __( 'Next &rarr;', 'cakifo' )
) );

// Normal 'Previous' and 'Next' links
elseif ( ! is_singular() && $nav = get_posts_nav_link( array( 'sep' => '', 'prelabel' => '<span class="previous">' . __( '&larr; Previous', 'cakifo' ) . '</span>', 'nxtlabel' => '<span class="next">' . __( 'Next &rarr;', 'cakifo' ) . '</span>' ) ) ) : ?>

<nav class="pagination">
<h3 class="assistive-text"><?php _e( 'Post navigation', 'cakifo' ); ?></h3>
<?php echo $nav; ?>
</nav> <!-- .pagination.loop-pagination -->

<?php endif; ?>
Something went wrong with that request. Please try again.