Retrieves the previous post link that is adjacent to the current post.
$formatstringoptional
Default:'« %link'
$linkstringoptional
'%title'.Default:'%title'
$in_same_termbooloptional
Default:false
$excluded_termsint[]|stringoptional
Default:''
$taxonomystringoptional
$in_same_term is true. Default 'category'.Default:'category'
function get_previous_post_link( $format = '« %link', $link = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
return get_adjacent_post_link( $format, $link, $in_same_term, $excluded_terms, true, $taxonomy );
}
| Version | Description |
|---|---|
| 3.7.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_previous_post_link