Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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