get_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 a same taxonomy term. Default false.
  • (array|string) $excluded_terms Optional. Array or comma-separated list of excluded terms 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'.
  • (string) The link URL of the previous or next post in relation to the current post.
Defined at:


Retrieves the adjacent post link.

Can be either next post link or previous.

Related Functions

get_adjacent_post_rel_link, adjacent_post_link, get_adjacent_post, get_delete_post_link, get_next_post_link

Top Google Results

User discussions

wpseek mobile