Reference › Functions adjacent_post_link ( string $format , string $link , bool $in_same_term = false , int[] | string $excluded_terms = '' , bool $previous = true , string $taxonomy = 'category' )
Since 2.5.0
Source wp-includes/link-template.php:2408Description Parameters Uses Source History Displays the adjacent post link.
Description Can be either next post link or previous.
Parameters
$formatstring Link anchor format.
$linkstring Link permalink format.
$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 category IDs. Default empty.Default: ''
$previousbool optional Whether to display link to previous or next post. Default true.Default: true
$taxonomystring optional Taxonomy, if $in_same_term is true. Default 'category'.Default: 'category' Source View on Trac ↗ View on GitHub ↗
2408 function adjacent_post_link ( $format , $link , $in_same_term = false , $excluded_terms = '' , $previous = true , $taxonomy = 'category' ) { 2409 echo get_adjacent_post_link ( $format , $link , $in_same_term , $excluded_terms , $previous , $taxonomy ) ; 2410 } History Introduced in 2.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 6.7.7 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.