Reference › Functions previous_post_link ( string $format = '« %link' , string $link = '%title' , bool $in_same_term = false , int[] | string $excluded_terms = '' , string $taxonomy = 'category' )
Since 1.5.0
Source wp-includes/link-template.php:2285Parameters Uses Used by Source History Displays the previous post link that is adjacent to the current post.
Parameters
$formatstring optional Link anchor format. Default '« %link'.Default: '« %link'
$linkstring optional Link permalink format. Default '%title'.Default: '%title'
$in_same_termbool optional Whether link should be in the same taxonomy term. Default false.Default: false
$excluded_termsint[] | stringoptional Array or comma-separated list of excluded term IDs. Default empty.Default: ''
$taxonomystring optional Taxonomy, if $in_same_term is true. Default 'category'.Default: 'category' Source View on Trac ↗ View on GitHub ↗
2285 function previous_post_link ( $format = '« %link' , $link = '%title' , $in_same_term = false , $excluded_terms = '' , $taxonomy = 'category' ) { 2286 echo get_previous_post_link ( $format , $link , $in_same_term , $excluded_terms , $taxonomy ) ; 2287 } History Introduced in 1.5.0 . Unchanged from 6.7.7 through 7.1.0.
6.7.7 6.8.8 6.9.7 7.0.4 7.1.0 Signature, return type and hooks compared across 5 parsed releases.
About this page Parsed data Generated from the wordpress-develop 7.0.4 tag, from src/wp-includes/link-template.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. Corrections Something wrong on this page? Report it and it gets fixed in the next regeneration.