Skip to content

Instantly share code, notes, and snippets.

@upekshawisidagama
Created August 31, 2012 11:42
Show Gist options
  • Save upekshawisidagama/3551778 to your computer and use it in GitHub Desktop.
Save upekshawisidagama/3551778 to your computer and use it in GitHub Desktop.
Standard Pagination Method for WordPress - Twenty Eleven
The following was extracted from WordPress Twenty Eleven theme.
If you want to integrate pagination yourself modify and used the following code snippet.
<nav id="nav-single">
<h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>
<span class="nav-previous"><?php previous_post_link( '%link', __( '<span class="meta-nav">&larr;</span> Previous', 'twentyeleven' ) ); ?></span>
<span class="nav-next"><?php next_post_link( '%link', __( 'Next <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?></span>
</nav><!-- #nav-single -->
You can refer to Codex for changing your code further.
http://codex.wordpress.org/Function_Reference/previous_post_link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment