Skip to content

Instantly share code, notes, and snippets.

@skmezanul
Forked from eugenoprea/functions.php
Created June 12, 2014 07:27
Show Gist options
  • Save skmezanul/e3889ea059143df77193 to your computer and use it in GitHub Desktop.
Save skmezanul/e3889ea059143df77193 to your computer and use it in GitHub Desktop.
/** 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 -->';
}
}
.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