get_page_children [ WordPress Function ]
get_page_children ( $page_id, $pages )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: get_children, get_term_children, _get_term_children, get_category_children, get_page_link
Retrieve child pages from list of pages matching page ID.
Matches against the pages parameter against the page ID. Also matches all children for the same to retrieve all children of a page. Does not make any SQL queries to get the children.
Source
<?php
function &get_page_children($page_id, $pages) {
$page_list = array();
foreach ( (array) $pages as $page ) {
if ( $page->post_parent == $page_id ) {
$page_list[] = $page;
if ( $children = get_page_children($page->ID, $pages) )
$page_list = array_merge($page_list, $children);
}
}
return $page_list;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/get page children « WordPress Codex
Description. Retrieve child pages from list of pages matching page ID. Matches against the pages parameter against the page ID. Also matches all children for ...
codex.wordpress.org - WordPress › Support » Tags — get_page_children
WordPress › Support » get_page_children. Tag: get_page_children Add New » ... [Plugin: Exclude Pages] get_page_children, 2, Simon Wheatley, 3 years ...
wordpress.org - get_page_children | A HitchHackers guide through WordPress
Feb 12, 2011 ... Matches against the pages parameter against the page ID. Also matches all children for the same to retrieve all children of a page. Does not ...
hitchhackerguide.com - get children - get_page_children arguments - page objects ...
Nov 25, 2011 ... <?php get_page_children( $page_id, $pages ) ?> $page is defined as a "List of pages' objects". What are examples of page objects I would ...
wordpress.stackexchange.com
Gebruikersdiscussies [ wordpress.org ]
- anve on "Get direct successor of given ID"
- Fire Truck on "Get direct successor of given ID"
- anve on "Get direct successor of given ID"
- Grey Hargreaves on "Code to list child pages not working"
- alchymyth on "Code to list child pages not working"
- Grey Hargreaves on "Code to list child pages not working"
- Grey Hargreaves on "Code to list child pages not working"
- sahanz on "Child Pages Wont Come Up"
- Simon Wheatley on "[Plugin: Exclude Pages] get_page_children"
- lazyron on "[Plugin: Exclude Pages] get_page_children"