Opened 5 months ago
Last modified 5 months ago
#22957 new defect (bug)
get_boundary_post Only works from a single page
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Template | Version: | 2.8 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
I was trying to use get_boundary_post in my theme to display a link to the first and last posts, but it does not work from the homepage. Unless called from a single post, get_boundary_post will return NULL.
I can't see any reason for this behavior, or any good way around it.
Attachments (1)
Change History (6)
comment:1
SergeyBiryukov — 5 months ago
- Component changed from General to Template
comment:2
SergeyBiryukov — 5 months ago
What is the reason for this?
I understand why start_post_rel_link might want to only fire on single posts, but I see no reason to limit the avaliability of get_boundary_post.
On a related note, when there is nothing to return, why does it return NULL rather than FALSE like similar functions?
comment:5
SergeyBiryukov — 5 months ago
- Version changed from trunk to 2.8
Note: See
TracTickets for help on using
tickets.

Has been this way since introduction in [10815] (#8703).