Ok, lets break it down, all the links are going to be to the source code.
wp_list_pages()
only uses get_pages()
to (sic!) get pages, walk_page_tree()
does the hierarchical structuring inside it. The further course of the process goes Walker_Page
– and the generic Walker
of course -, unless a custom walker is used. Inside walk_page_tree()
you will see, the walkers walk
method is called, which subsequently calls the display_element
method. Mainly in the display_element
, but also in the walk
, method you find the handling of the depth.
To make it short: the depth is handled by iterating, display_element
calls itself until the end or the given depth
parameter.
Related Posts:
- Check whether the child page has siblings
- How to echo excerpts with wp_list_pages?
- Extra title output with this function wp_list_pages
- List child pages by slug not ID?
- Combining ‘depth’ with ‘include’ in wp_list_pages()
- Get the ID of the direct parent page
- Get parent of current page
- Post Fetching Ignoring Sort_Column?
- Exclude pages by menu order
- Change page name in admin list
- Check if the child page has sibling pages, and bookmark current page
- Keep page hierarchy in wp_list_pages, even if on a child or grandchild
- Check if page has subpages
- How should I set up a Tumblr blog at a WordPress Page?
- Translate dashboard metabox
- Include parent page in list of child pages
- wp_list_pages get the hole hierarchy for current page
- Remove and change pages label
- Get All Pages as strings in array
- How To List Sibling Pages And Include The Featured Image?
- How to make in post Parent page children page list nummbered
- Custom wp_list_pages() function
- Get page id by template
- How to load JS and CSS only on specific Pages using is_page()?
- Listing pages which uses specific template [duplicate]
- How to add jQuery script to an individual page?
- WordPress page edit does not save selected template
- How to create virtual pages with information from user meta profile fields?
- Increment Page Order As Pages Are Created
- Private pages that work when you are not logged into WP admin
- Where does the 404 redirection happen?
- How to limit page pagination
- Add custom text at bottom of every page?
- Remove specific page/post from feed
- Creating custom page
- Want Page Title to show on menu, but not on page
- Personal page for every user (not just authors)
- Create ghost page
- load common thank you template with different content for different pages
- List pages by custom field?
- Send mail from page using wp_mail
- Edit page’s “Restore the backup” link does nothing
- Load specific page template based on URI
- Show preview posts and pages to clients
- wp_list_pages() but only show children on the branch you are on
- Site url is not showing the home page
- I can’t edit my homepage – the page editor is just blank [closed]
- Page redirects to archive
- Restricting Pages based on Hierarchy and User Role
- Pages Column Sorting WordPress Version 3.0.3
- Adding Page URL to the Pages Admin Table
- More Fields Required For Password protect page
- page-name.php doesn’t execute on custom template
- Add categories and posts to page hierarchy
- Admin taking a very long time to load
- Hide page templates without using ‘unset’
- Custom page with queries returns 404
- WordPress Site Page Exists but Error 404
- page.php is not called, falls back to index.php
- Custom page in archive page for certain category
- Is it possible to check for shortcodes on a page?
- WordPress 3.2 – removed ability to select a page template in the page attributes when adding a new page?
- Can I “protect” a page with a form asking for an email address?
- Use same page-mypage.php template for several pages
- Is it possible to restrict access to specific pages in the admin area based on the page slug?
- Make “default” wordpress pages & features unaccessible
- How to create cutom link for page
- Set a variable to using in redirected page
- creating single page with 2 columns while theme is 3 column
- Outputting content from page
- Use an archive as the parent of a page?
- Displaying the blog entries in a Page (using get_posts to retrieve the posts)?
- Different template parts when on different pages
- Updating page template pragmatically
- Why can’t pages be categorized / tagged?
- Adding in additional pages into a custom theme
- List of pages of a specific user
- Multiple meta_key with get_pages
- Sup pages can’t be found
- How to use wp_dropdown_pages or wp_list_pages to accomplish a menu like this?
- Get child pages in get_pages function
- WordPress Page All Content In Template Good Or Bad Convention?
- Bundle a page with custom url and a function
- Custom Upload Adds Ghost File
- Displaying Content Only in Certain Page IDs Not Working
- How to display data with pagaination on backend?
- How to Change the path of a child page?
- Annoying notification when trying to create a new page
- Page stuttering on load
- WP Template Hierarchy – Need help choosing the correct templates
- the_content() Returns post content when I want page content
- disable trashability for certain pages
- how bbPress and buddypress add their own page templates to the page template drop down on the page editing screen
- Can’t select a page using is_page()
- pages won’t show on front page using loop or pre_get_posts
- Does WordPress list all pages for crawlers?
- List of pages – AJAX load more
- one time visit to the page
- How to display child page from specific parent page in homepage?
- How to display text of a page in home or custom page?