wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



adjacent_post_link › WordPress Function

Depuis2.5.0
Dépréciéen/a
adjacent_post_link ( $format, $link, $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' )
Paramètres: (6)
  • (string) $format Link anchor format.
    Requis: Oui
  • (string) $link Link permalink format.
    Requis: Oui
  • (bool) $in_same_term Optional. Whether link should be in the same taxonomy term. Default false.
    Requis: Non
    Défaut: false
  • (int[]|string) $excluded_terms Optional. Array or comma-separated list of excluded category IDs. Default empty.
    Requis: Non
    Défaut: (vide)
  • (bool) $previous Optional. Whether to display link to previous or next post. Default true.
    Requis: Non
    Défaut: true
  • (string) $taxonomy Optional. Taxonomy, if `$in_same_term` is true. Default 'category'.
    Requis: Non
    Défaut: 'category'
Défini(e) dans:
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 );
}