WPDev.one
Core Function
View Source on Trac ↗

get_boundary_post()

get_boundary_post( mixed $in_same_term = false, mixed $excluded_terms = '', mixed $start = true, mixed $taxonomy = 'category' )

Retrieves the boundary post.

Parameters 3 required

Name / Type Description
bool

$in_same_term Optional. Whether returned post 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
bool

$start Optional. Whether to retrieve first or last post. Default true.

Required
$taxonomy
string

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

Return Value

((array)
| null) Array containing the boundary post object if successful, null otherwise.

Function Information

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