Skip to content

Instantly share code, notes, and snippets.

@mac4media
Created April 1, 2015 12:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mac4media/dcf6ca7426dc79b7eeec to your computer and use it in GitHub Desktop.
Save mac4media/dcf6ca7426dc79b7eeec to your computer and use it in GitHub Desktop.
Genesis Previous & Next Links
<?php
/*Previous & Next Links*/
add_action( 'loop_end', 'custom_single_post_nav', 12 );
function custom_single_post_nav() {
if ( ! is_singular( array( 'post', 'reviews', 'bundles', 'books' ) ) )
return;
echo'<nav class="post-navigation">';
echo'<div class="nav-links">';
previous_post_link( '<div class="nav-previous">%link</div>' );
next_post_link( '<div class="nav-next">%link</div>' );
echo'</nav>';
echo'</div>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment