Created
February 7, 2016 07:05
-
-
Save hsleonis/16c3b8414d83cbbbb2f6 to your computer and use it in GitHub Desktop.
Used on single post permalink pages, this template tag displays a link to the previous post which exists in chronological order from the current post.
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 | |
/* | |
previous_post_link( $format, $link, $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ); | |
*/ | |
previous_post_link('%link', 'Previous in category', TRUE, '12'); | |
previous_post_link( '%link', 'Previous post in category', TRUE, ' ', 'post_format' ); | |
// Using font-awesome icon in link custom buttom | |
previous_post_link( '%link', '<i class="sprite sprite-left-arrow"></i>', TRUE, ' ', 'status' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment