Created
February 4, 2014 17:30
-
-
Save jaredatch/8808432 to your computer and use it in GitHub Desktop.
Display next/prev post links
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Display Next/Prev link on single posts | |
* | |
* @since 1.0.0 | |
*/ | |
function ja_prev_next_post_nav() { | |
if ( is_singular( 'post' ) ) { | |
echo '<div class="prev-next-navigation">'; | |
previous_post_link( '<div class="previous">Previous article: %link</div>', '%title' ); | |
next_post_link( '<div class="next">Next Post: %link</div>', '%title' ); | |
echo '</div>'; | |
} | |
} | |
add_action( 'genesis_before_comments', 'ja_prev_next_post_nav' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment