WPDev.one
Core Function
View Source on Trac ↗

next_post_link()

next_post_link( mixed $format = '%link »', mixed $link = '%title', mixed $in_same_term = false, mixed $excluded_terms = '', mixed $taxonomy = 'category' )

Displays the next post link that is adjacent to the current post.

Parameters 2 required

Name / Type Description
$format
string

Optional. Link anchor format. Default '« %link'.

$link
string

Optional. Link permalink 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
$taxonomy
string

Optional. Taxonomy, if `$in_same_term` is true. Default 'category'.

Return Value

(void)
No return value description available.

Function Information

Since Version
1.5.0
Source File
wp-includes/link-template.php
Advertisement