Core Function
View Source on Trac ↗ get_adjacent_post_rel_link()
get_adjacent_post_rel_link(
mixed $title = '%title',
mixed $in_same_term = false,
mixed $excluded_terms = '',
mixed $previous = true,
mixed $taxonomy = 'category'
) Retrieves the adjacent post relational link.
Parameters 3 required
| Name / Type | Description |
|---|---|
| $title string | Optional. Link title format. Default '%title'. |
| 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 term 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
((string)
| void) The adjacent post relational link URL.
Function Information
Since Version
2.8.0
Source File
wp-includes/link-template.php
Advertisement