Core Function
View Source on Trac ↗ adjacent_post_link()
adjacent_post_link(
mixed $format,
mixed $link,
mixed $in_same_term = false,
mixed $excluded_terms = '',
mixed $previous = true,
mixed $taxonomy = 'category'
) Displays the adjacent post link.
Parameters 5 required
| Name / Type | Description |
|---|---|
| $format string | Link anchor format. Required |
| $link string | Link permalink format. Required |
| bool | $in_same_term Optional. Whether link should be in the same taxonomy term. Default false. Required |
| mixed | (int[] | string) $excluded_terms Optional. Array or comma-separated list of excluded category IDs. Default empty. Required |
| bool | $previous Optional. Whether to display link to previous or next post. Default true. Required |
| $taxonomy string | Optional. Taxonomy, if `$in_same_term` is true. Default 'category'. |
Return Value
(void)
No return value description available.
Function Information
Since Version
2.5.0
Source File
wp-includes/link-template.php
Advertisement