get_boundary_post
get_boundary_post ( $in_same_term = false, $excluded_terms = '', $start = true, $taxonomy = 'category' )
Parameters:- (bool) in_same_term Optional. Whether returned post should be in the same taxonomy term. Default false.
- (int[]|string) excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
- (bool) start Optional. Whether to retrieve first or last post. Default true.
- (string) taxonomy Optional. Taxonomy, if `$in_same_term` is true. Default 'category'.
Returns:- (array|null) Array containing the boundary post object if successful, null otherwise.
Defined at: - Introduced in WordPress: 2.8.0
- Deprecated in WordPress: —
Description
Retrieves the boundary post.Boundary being either the first or last post by publish date within the constraints specified
by `$in_same_term` or `$excluded_terms`.