A WordPress-centric search engine for devs and theme authors



adjacent_post_link ›

Since2.5.0
Deprecatedn/a
adjacent_post_link ( $format, $link, $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' )
Parameters: (6)
  • (string) $format Link anchor format.
    Required: Yes
  • (string) $link Link permalink format.
    Required: Yes
  • (bool) $in_same_term Optional. Whether link should be in a same taxonomy term. Default false.
    Required: No
    Default: false
  • (array|string) $excluded_terms Optional. Array or comma-separated list of excluded category IDs. Default empty.
    Required: No
    Default: (empty)
  • (bool) $previous Optional. Whether to display link to previous or next post. Default true.
    Required: No
    Default: true
  • (string) $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'.
    Required: No
    Default: 'category'
Defined at:
Codex:

Displays the adjacent post link.

Can be either next post link or previous.



Source

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 );
}