adjacent_post_link ( $format, $link, $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' )

  • (string) format Link anchor format.
  • (string) link Link permalink format.
  • (bool) in_same_term Optional. Whether link should be in the same taxonomy term. Default false.
  • (int[]|string) excluded_terms Optional. Array or comma-separated list of excluded category IDs. Default empty.
  • (bool) previous Optional. Whether to display link to previous or next post. Default true.
  • (string) taxonomy Optional. Taxonomy, if `$in_same_term` is true. Default 'category'.
Defined at:


Displays the adjacent post link.Can be either next post link or previous.

Related Functions

get_adjacent_post_link, adjacent_posts_rel_link, get_adjacent_post_rel_link, adjacent_image_link, edit_post_link

Top Google Results

User discussions

wpseek mobile