Advertisements

twentyeleven_content_nav

Definition:
function twentyeleven_content_nav( $nav_id ) {}

Display navigation to next/previous pages when applicable

Parameters

  • $nav_id

Source code

function twentyeleven_content_nav( $nav_id ) {

	global $wp_query;



	if ( $wp_query->max_num_pages > 1 ) : ?>

		<nav id="<?php echo $nav_id; ?>">

			<h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>

			<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyeleven' ) ); ?></div>

			<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?></div>

		</nav><!-- #nav-above -->

	<?php endif;

}

14721

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: