Opened 8 years ago
Closed 8 years ago
#39369 closed defect (bug) (fixed)
The document of wp_list_pages() is not clear.
Reported by: | doublehhh | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.8 | Priority: | normal |
Severity: | normal | Version: | 4.8 |
Component: | Posts, Post Types | Keywords: | has-patch |
Focuses: | docs | Cc: |
Description
The document of wp_list_pages() is not clear. Developers can use non-hierarchical post type. It makes them confused.
Attachments (1)
Change History (6)
#3
in reply to:
↑ 2
@
8 years ago
- Milestone changed from Awaiting Review to 4.8
Replying to swissspidy:
wp_list_pages()
does not support setting the post type in$args
.
I think it does, as it passes the list of arguments directly to get_pages()
, and post_type
is one of the documented arguments in both functions.
I've just tested wp_list_pages()
with a hierarchical CPT, and it works as expected.
Note: See
TracTickets for help on using
tickets.
wp_list_pages()
does not support setting the post type in$args
. The function usesget_pages()
which in turn supports that, but not when called viawp_list_pages()
.For 39369.patch to be true,
wp_list_pages()
would actually need to support this.