/**
     * Display navigation to next/previous pages when applicable
     */
    function omega_content_nav()
    {
        global $wp_query, $post;
        // Don't print empty markup on single pages if there's nowhere to navigate.
        if (is_single()) {
            $previous = is_attachment() ? get_post($post->post_parent) : get_adjacent_post(false, '', true);
            $next = get_adjacent_post(false, '', false);
            if (!$next && !$previous) {
                return;
            }
        }
        if (is_singular() && !get_theme_mod('single_nav', 0)) {
            return;
        }
        // Don't print empty markup in archives if there's only one page.
        if ($wp_query->max_num_pages < 2 && (is_home() || is_archive() || is_search())) {
            return;
        }
        $nav_class = is_single() ? 'post-navigation' : 'paging-navigation';
        ?>
	<nav role="navigation" id="nav-below" class="navigation  <?php 
        echo $nav_class;
        ?>
">

	<?php 
        if (is_single() && get_theme_mod('single_nav', 0)) {
            // navigation links for single posts
            ?>

		<?php 
            previous_post_link('<div class="nav-previous alignleft">%link</div>', '<span class="meta-nav">' . _x('&larr;', 'Previous post link', 'omega') . '</span> %title');
            ?>
		<?php 
            next_post_link('<div class="nav-next alignright">%link</div>', '%title <span class="meta-nav">' . _x('&rarr;', 'Next post link', 'omega') . '</span>');
            ?>

	<?php 
        } elseif ($wp_query->max_num_pages > 1 && (is_home() || is_archive() || is_search())) {
            // navigation links for home, archive, and search pages
            ?>

		<?php 
            loop_pagination();
            ?>

	<?php 
        }
        ?>

	</nav><!-- #nav-below -->
	<?php 
    }
Esempio n. 2
0
	<?php 
} elseif (is_singular('post')) {
    ?>


		<div class="loop-nav">
			<?php 
    previous_post_link('%link', '<span class="previous">' . __('<span class="meta-nav">&larr;</span> Previous', hybrid_get_textdomain()) . '</span>');
    ?>
			<?php 
    next_post_link('%link', '<span class="next">' . __('Next <span class="meta-nav">&rarr;</span>', hybrid_get_textdomain()) . '</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', hybrid_get_textdomain()), 'next_text' => __('Next <span class="meta-nav">&rarr;</span>', hybrid_get_textdomain())));
    ?>

	<?php 
} elseif (!is_singular() && ($nav = get_posts_nav_link(array('sep' => '', 'prelabel' => '<span class="previous">' . __('<span class="meta-nav">&larr;</span> Previous', hybrid_get_textdomain()) . '</span>', 'nxtlabel' => '<span class="next">' . __('Next &rarr;', hybrid_get_textdomain()) . '</span>')))) {
    ?>

		<div class="loop-nav">
			<?php 
    echo $nav;
    ?>
		</div><!-- .loop-nav -->

	<?php 
}
Esempio n. 3
0
/**
 * Archive Footer (Pagination)
 *
 * @since 0.1.0
 */
function tamatebako_archive_footer()
{
    ?>

	<?php 
    if (is_home() || is_archive() || is_search()) {
        ?>

		<?php 
        loop_pagination(array('prev_text' => '<span class="screen-reader-text">' . tamatebako_string('previous') . '</span>', 'next_text' => '<span class="screen-reader-text">' . tamatebako_string('next') . '</span>', 'end_size' => 3, 'mid_size' => 3));
        ?>

	<?php 
    }
    ?>

<?php 
}
Esempio n. 4
0
	<?php 
} elseif (is_singular('post')) {
    ?>

		<div class="loop-nav">
			<?php 
    previous_post_link('%link', '<span class="previous">' . __('<span class="meta-nav">&larr;</span> Previous', 'bearded') . '</span>');
    ?>
			<?php 
    next_post_link('%link', '<span class="next">' . __('Next <span class="meta-nav">&rarr;</span>', 'bearded') . '</span>');
    ?>
		</div><!-- .loop-nav -->

	<?php 
} elseif (!is_singular() && current_theme_supports('loop-pagination')) {
    loop_pagination(array('prev_text' => __('Previous', 'bearded'), 'next_text' => __('Next', 'bearded')));
    ?>

	<?php 
} elseif (!is_singular() && ($nav = get_posts_nav_link(array('sep' => '', 'prelabel' => '<span class="previous">' . __('Previous', 'bearded') . '</span>', 'nxtlabel' => '<span class="next">' . __('Next', 'bearded') . '</span>')))) {
    ?>

		<div class="loop-nav">
			<?php 
    echo $nav;
    ?>
		</div><!-- .loop-nav -->

	<?php 
}
Esempio n. 5
0
			<?php previous_post_link( '<div class="previous"><span>' . __( 'Previous Post ', hybrid_get_parent_textdomain() ) . '</span>' . __('%link', hybrid_get_parent_textdomain()) . '</div>', '%title' ); ?>
			
			<?php /*
			<div class="previous">
				<?php previous_post_link( '<span>' . __('%link', hybrid_get_parent_textdomain() ) . '</span>','Previous Post'); ?>
				<?php previous_post_link( '%link','%title'); ?>
			</div>
			*/ ?>
			
			<?php next_post_link( '<div class="next"><span>' . __( 'Next Post ', hybrid_get_parent_textdomain() ) . '</span>' . __('%link', hybrid_get_parent_textdomain()) . '</div>', '%title' ); ?>
			
			<?php /*
			<div class="next">
				<?php next_post_link( '<span>' . __('%link', hybrid_get_parent_textdomain() ) . '</span>','Next Post'); ?>
				<?php next_post_link( '%link','%title'); ?>
			</div>
			*/ ?>
			
			<div class="clear"></div>
		</div><!-- .loop-nav -->

	<?php elseif ( !is_singular() && current_theme_supports( 'loop-pagination' ) ) : loop_pagination(); ?>

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

		<div class="loop-nav">
			<?php echo $nav; ?>
		</div><!-- .loop-nav -->

	<?php endif; ?>
Esempio n. 6
0
 * @package Pogidude
 * @subpackage Template
 */
?>
	<?php $loop_args = array(	'end_size' => 2,
								'mid_size' => 2
							);
	?>
							
	<?php if ( is_attachment() ) : ?>

		<div class="loop-nav">
			<?php previous_post_link( '%link', '<span class="previous">' . __( '&larr; Return to entry', 'cleanaire' ) . '</span>' ); ?>
		</div><!-- .loop-nav -->

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

		<div class="loop-nav">
			<?php previous_post_link( '<div class="previous">' . __( 'Previous Entry: %link', 'cleanaire' ) . '</div>', '%title' ); ?>
			<?php next_post_link( '<div class="next">' . __( 'Next Entry: %link', 'cleanaire' ) . '</div>', '%title' ); ?>
		</div><!-- .loop-nav -->

	<?php elseif ( !is_singular() ) : loop_pagination( $loop_args ); ?>

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

		<div class="loop-nav">
			<?php echo $nav; ?>
		</div><!-- .loop-nav -->

	<?php endif; ?>
Esempio n. 7
0
			<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 
Esempio n. 8
0
    /**
     * Display navigation to next/previous pages when applicable
     */
    function omega_content_nav($nav_id)
    {
        global $wp_query, $post;
        // Don't print empty markup on single pages if there's nowhere to navigate.
        if (is_single()) {
            $previous = is_attachment() ? get_post($post->post_parent) : get_adjacent_post(false, '', true);
            $next = get_adjacent_post(false, '', false);
            if (!$next && !$previous) {
                return;
            }
        }
        // Don't print empty markup in archives if there's only one page.
        if ($wp_query->max_num_pages < 2 && (is_home() || is_archive() || is_search())) {
            return;
        }
        $nav_class = is_single() ? 'post-navigation' : 'paging-navigation';
        ?>
	<nav role="navigation" id="<?php 
        echo esc_attr($nav_id);
        ?>
" class="navigation  <?php 
        echo $nav_class;
        ?>
">

	<?php 
        if (is_single() && !omega_get_setting('single_nav')) {
            // navigation links for single posts
            ?>

		<?php 
            previous_post_link('<div class="nav-previous alignleft">%link</div>', '<span class="meta-nav">' . _x('&larr;', 'Previous post link', 'omega') . '</span> %title');
            ?>
		<?php 
            next_post_link('<div class="nav-next alignright">%link</div>', '%title <span class="meta-nav">' . _x('&rarr;', 'Next post link', 'omega') . '</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 (current_theme_supports('loop-pagination') && 'numeric' == omega_get_setting('posts_nav')) {
                loop_pagination();
            } else {
                if (get_next_posts_link()) {
                    ?>
			<div class="nav-previous alignleft"><?php 
                    next_posts_link(__('<span class="meta-nav">&larr;</span> Previous Page', 'omega'));
                    ?>
</div>
			<?php 
                }
                ?>

			<?php 
                if (get_previous_posts_link()) {
                    ?>
			<div class="nav-next alignright"><?php 
                    previous_posts_link(__('Next Page <span class="meta-nav">&rarr;</span>', 'omega'));
                    ?>
</div>
			<?php 
                }
            }
            ?>

	<?php 
        }
        ?>

	</nav><!-- #<?php 
        echo esc_html($nav_id);
        ?>
 -->
	<?php 
    }
Esempio n. 9
0
<?php

if (is_singular('post')) {
    // If viewing a single post page.
    ?>

	<div class="loop-nav">
		<?php 
    previous_post_link('<div class="prev">' . __('Previous Post: %link', 'gomedia') . '</div>', '%title');
    ?>
		<?php 
    next_post_link('<div class="next">' . __('Next Post: %link', 'gomedia') . '</div>', '%title');
    ?>
	</div><!-- .loop-nav -->

<?php 
} elseif (is_home() || is_archive() || is_search()) {
    // If viewing the blog, an archive, or search results.
    ?>

	<?php 
    loop_pagination(array('prev_text' => _x('Previous', 'posts navigation', 'gomedia'), 'next_text' => _x('Next', 'posts navigation', 'gomedia'), 'before' => '<nav class="loop-pagination"><ul class="pagination">', 'after' => '</ul></nav>'));
    ?>

<?php 
}
// End check for type of page being viewed.
Esempio n. 10
0
/**
 * A template part to display single entry navigation and pagination for archives.
 *
 * @package     Compass
 * @subpackage  HybridCore
 * @copyright   Copyright (c) 2014, Flagship, LLC
 * @license     GPL-2.0+
 * @link        http://flagshipwp.com/
 * @since       1.0.0
 */
?>

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

	<nav class="nav-single">
		<?php 
    previous_post_link('<span class="nav-previous">' . __('%link', 'compass') . '</span>', '&larr; Previous Post');
    ?>
		<?php 
    next_post_link('<span class="nav-next">' . __('%link', 'compass') . '</span>', 'Next Post &rarr;');
    ?>
	</nav><!-- .nav-singl -->

	<?php 
}
if (is_home() || is_archive() || is_search()) {
    loop_pagination(array('prev_text' => '<span class="screen-reader-text">' . __('Previous Page', 'compass') . '</span>', 'next_text' => '<span class="screen-reader-text">' . __('Next Page', 'compass') . '</span>'));
}
Esempio n. 11
0
	<?php 
} elseif (is_singular('post')) {
    ?>

		<nav class="loop-nav">
			<?php 
    previous_post_link('%link', '<span class="previous">' . __('&larr; Previous', 'melange') . '</span>');
    ?>
			<?php 
    next_post_link('%link', '<span class="next">' . __('Next &rarr;', 'melange') . '</span>');
    ?>
		</nav>

	<?php 
} elseif (!is_singular() && current_theme_supports('loop-pagination')) {
    loop_pagination(array('prev_text' => __('&larr; Previous', 'melange'), 'next_text' => __('Next &rarr;', 'melange')));
    ?>

	<?php 
} elseif (!is_singular() && ($nav = get_posts_nav_link(array('sep' => '', 'prelabel' => '<span class="previous">' . __('&larr; Previous', 'melange') . '</span>', 'nxtlabel' => '<span class="next">' . __('Next &rarr;', 'melange') . '</span>')))) {
    ?>

		<nav class="loop-nav">
			<?php 
    echo $nav;
    ?>
		</nav><!-- .loop-nav -->

	<?php 
}
Esempio n. 12
0
	<?php 
} elseif (is_singular('post')) {
    ?>

		<nav class="loop-nav">
			<?php 
    previous_post_link('%link', '<span class="previous">' . __('&larr; Previous', 'infusion') . '</span>');
    ?>
			<?php 
    next_post_link('%link', '<span class="next">' . __('Next &rarr;', 'infusion') . '</span>');
    ?>
		</nav>

	<?php 
} elseif (!is_singular() && current_theme_supports('loop-pagination')) {
    loop_pagination(array('prev_text' => __('&larr; Previous', 'infusion'), 'next_text' => __('Next &rarr;', 'infusion')));
    ?>

	<?php 
} elseif (!is_singular() && ($nav = get_posts_nav_link(array('sep' => '', 'prelabel' => '<span class="previous">' . __('&larr; Previous', 'infusion') . '</span>', 'nxtlabel' => '<span class="next">' . __('Next &rarr;', 'infusion') . '</span>')))) {
    ?>

		<nav class="loop-nav">
			<?php 
    echo $nav;
    ?>
		</nav><!-- .loop-nav -->

	<?php 
}
Esempio n. 13
0
<?php

if (is_singular('post')) {
    // If viewing a single post page.
    ?>

	<div class="loop-nav">
		<?php 
    previous_post_link('<div class="prev">' . __('Previous Post: %link', 'hybrid-base') . '</div>', '%title');
    ?>
		<?php 
    next_post_link('<div class="next">' . __('Next Post: %link', 'hybrid-base') . '</div>', '%title');
    ?>
	</div><!-- .loop-nav -->

<?php 
} elseif (is_home() || is_archive() || is_search()) {
    // If viewing the blog, an archive, or search results.
    ?>

	<?php 
    loop_pagination(array('prev_text' => _x('&larr; Previous', 'posts navigation', 'hybrid-base'), 'next_text' => _x('Next &rarr;', 'posts navigation', 'hybrid-base')));
    ?>

<?php 
}
// End check for type of page being viewed.
Esempio n. 14
0
<?php

if (is_singular('post')) {
    // If viewing a single post page.
    ?>

	<div class="loop-nav">
		<?php 
    previous_post_link('<div class="prev">' . __('Previous Post: %link', 'stargazer') . '</div>', '%title');
    ?>
		<?php 
    next_post_link('<div class="next">' . __('Next Post: %link', 'stargazer') . '</div>', '%title');
    ?>
	</div><!-- .loop-nav -->

<?php 
} elseif (is_home() || is_archive() || is_search()) {
    // If viewing the blog, an archive, or search results.
    ?>

	<?php 
    loop_pagination(array('prev_text' => _x('&larr; Previous', 'posts navigation', 'stargazer'), 'next_text' => _x('Next &rarr;', 'posts navigation', 'stargazer')));
    ?>

<?php 
}
// End check for type of page being viewed.
Esempio n. 15
0
	<?php 
} elseif (is_singular('post')) {
    ?>

		<div class="loop-nav">
			<?php 
    previous_post_link('%link', '<span class="previous">' . __('<span class="meta-nav">&larr;</span> Previous', 'my-life') . '</span>');
    ?>
			<?php 
    next_post_link('%link', '<span class="next">' . __('Next <span class="meta-nav">&rarr;</span>', 'my-life') . '</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', 'my-life'), 'next_text' => __('Next <span class="meta-nav">&rarr;</span>', 'my-life')));
    ?>

	<?php 
} elseif (!is_singular() && ($nav = get_posts_nav_link(array('sep' => '', 'prelabel' => '<span class="previous">' . __('<span class="meta-nav">&larr;</span> Previous', 'my-life') . '</span>', 'nxtlabel' => '<span class="next">' . __('Next &rarr;', 'my-life') . '</span>')))) {
    ?>

		<div class="loop-nav">
			<?php 
    echo $nav;
    ?>
		</div><!-- .loop-nav -->

	<?php 
}
Esempio n. 16
0
<?php 
} elseif (is_singular('post')) {
    ?>

    <div class="loop-nav">
        <?php 
    previous_post_link('<div class="previous">' . __('&larr; %link', 'origin') . '</div>', '%title');
    ?>
        <?php 
    next_post_link('<div class="next">' . __('%link', 'origin') . ' &rarr;</div>', '%title');
    ?>
    </div><!-- .loop-nav -->

<?php 
} elseif (!is_singular() && current_theme_supports('loop-pagination')) {
    loop_pagination();
    ?>

<?php 
} elseif (!is_singular() && ($nav = get_posts_nav_link(array('sep' => '', 'prelabel' => '<span class="previous">' . __('&larr; Previous', 'origin') . '</span>', 'nxtlabel' => '<span class="next">' . __('Next &rarr;', 'origin') . '</span>')))) {
    ?>

    <div class="loop-nav">
        <?php 
    echo $nav;
    ?>
    </div><!-- .loop-nav -->

<?php 
}
Esempio n. 17
0
	<?php 
} elseif (is_singular('post')) {
    ?>

		<div class="loop-nav">
			<?php 
    previous_post_link('%link', '<span class="previous">' . __('<span class="meta-nav">&larr;</span> Previous', 'satu') . '</span>');
    ?>
			<?php 
    next_post_link('%link', '<span class="next">' . __('Next <span class="meta-nav">&rarr;</span>', 'satu') . '</span>');
    ?>
		</div><!-- .loop-nav -->

	<?php 
} elseif (!is_singular() && current_theme_supports('loop-pagination')) {
    loop_pagination(array('before' => '<nav class="pagination loop-pagination" role="navigation">', 'after' => '</nav>', 'prev_text' => __('<span class="meta-nav">&larr;</span> Previous', 'satu'), 'next_text' => __('Next <span class="meta-nav">&rarr;</span>', 'satu')));
    ?>

	<?php 
} elseif (!is_singular() && ($nav = get_posts_nav_link(array('sep' => '', 'prelabel' => '<span class="previous">' . __('<span class="meta-nav">&larr;</span> Previous', 'satu') . '</span>', 'nxtlabel' => '<span class="next">' . __('Next &rarr;', 'satu') . '</span>')))) {
    ?>

		<div class="loop-nav">
			<?php 
    echo $nav;
    ?>
		</div><!-- .loop-nav -->

	<?php 
}