#10279 closed defect (bug) (invalid)
wp_list_pages hierarchical=0 shows hierarchy
Reported by: | michaelh | Owned by: | |
---|---|---|---|
Milestone: | Priority: | low | |
Severity: | minor | Version: | 2.8 |
Component: | Template | Keywords: | |
Focuses: | Cc: |
Description
Using the hierarchical=0 with wp_list_pages still causes the hierarchy to display.
Both these produce same result:
wp_list_pages('hierarchical=0&title_li=<h2>Pages</h2>' );
wp_list_pages('hierarchical=1&title_li=<h2>Pages</h2>' );
Seems to be broken as least far back as 2.5.1, if not before.
Note that hierarchical=0 works with wp_list_categories.
Reported in Codex by Dnusim
Change History (2)
Note: See
TracTickets for help on using
tickets.
wp_list_pages
always sets hierarchical to "0" when it calls get_pages, because hierarchical wouldn't work with the "Walker" class.I think you want to use the "depth" argument instead.