adjacent_post_link()WP 2.5.0

Displays the adjacent post link.

Can be either next post link or previous.

No Hooks.


null. Ничего (null).


adjacent_post_link( $format, $link, $in_same_term, $excluded_terms, $previous, $taxonomy );
$format(string) (required)
Link anchor format.
$link(string) (required)
Link permalink format.
Whether link should be in the same taxonomy term.
Default: false
Array or comma-separated list of excluded category IDs.
Default: ''
Whether to display link to previous or next post.
Default: true
Taxonomy, if $in_same_term is true.
Default: 'category'


Since 2.5.0 Introduced.

adjacent_post_link() code WP 6.4.1

function adjacent_post_link( $format, $link, $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) {
	echo get_adjacent_post_link( $format, $link, $in_same_term, $excluded_terms, $previous, $taxonomy );