Last active
December 11, 2015 16:38
-
-
Save jamiemitchell/4628867 to your computer and use it in GitHub Desktop.
Add next/prev to single post in Genesis Framework.
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 | |
/* Add Previous & Next Links in Genesis Single Post Page | |
------------------------------------------------------------ */ | |
add_action('genesis_after_post_content', 'genesis_post_navigation'); | |
function genesis_post_navigation() { | |
if ( is_single ( ) ) { ?> | |
<div id="prev-next"> | |
<div class="prev-link">← Previous Post | |
<?php previous_post_link('%link', '%title'); ?> | |
</div> | |
<div class="next-link">Next Post → | |
<?php next_post_link('%link', '%title'); ?> | |
</div> | |
</div> | |
<?php } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment