Skip to content

Instantly share code, notes, and snippets.

@robneu
Created December 12, 2012 07:27
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 robneu/4265800 to your computer and use it in GitHub Desktop.
Save robneu/4265800 to your computer and use it in GitHub Desktop.
Add simple post nav to single posts in a genesis theme
/** Add Post Nav to Single Posts */
add_action ('genesis_after_post_content', 'post_navigation');
function post_navigation() {
if ( is_single() ) {
echo '<div class="post-nav">';
previous_post_link('<div class="previous-post">Previous Post: %link</div>');
next_post_link('<div class="next-post">Next Post: %link</div>');
echo '</div>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment