Created
June 7, 2013 14:36
-
-
Save eugenoprea/5729708 to your computer and use it in GitHub Desktop.
Genesis Previous/Next Post Post Navigation
This file contains hidden or 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
/** Genesis Previous/Next Post Post Navigation */ | |
add_action( 'genesis_before_comments', 'eo_prev_next_post_nav' ); | |
function eo_prev_next_post_nav() { | |
if ( is_single() ) { | |
echo '<div class="prev-next-navigation">'; | |
previous_post_link( '<div class="previous">Previous article: %link</div>', '%title' ); | |
next_post_link( '<div class="next">Next article: %link</div>', '%title' ); | |
echo '</div><!-- .prev-next-navigation -->'; | |
} | |
} |
This file contains hidden or 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
.prev-next-navigation { | |
margin: 20px 0; | |
clear: both; | |
overflow: hidden; | |
} | |
.previous { | |
float: left; | |
width: 50%; | |
} | |
.next { | |
float: right; | |
text-align: right; | |
width: 50%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment