Make WordPress Core

Opened 9 years ago

Closed 5 years ago

#8342 closed enhancement (wontfix)

Support depth argument to get_pages.

Reported by: mellis Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Template Keywords:
Focuses: Cc:


wp_list_pages accepts a depth argument which limits the number of levels of the page hierarchy to descend. It would be great if the depth argument were promoted to the get_pages function to ease custom listing of part of the page hierarchy. This would be much simpler than using a Walker or manually limiting the depth of pages listed.

Change History (4)

9 years ago

  • Milestone changed from 2.8 to Future Release

#2 @Denis-de-Bernardy
9 years ago

  • Component changed from General to Template

#3 @Japh
5 years ago

  • Cc japh@… added

What is the use-case for having a depth argument on get_pages instead of just using wp_list_pages instead?

Essentially get_pages gives you an array of the pages, and that array is not tree-like. See the wp_list_pages() Template Tag for the output of page titles in a tree-like fashion.

(Emphasis added)

Perhaps this can be marked as 'wontfix'?

#4 @SergeyBiryukov
5 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

No traction in four years.

Note: See TracTickets for help on using tickets.