iterate_children_pages.php

$query = new WP_Query(); $all_pages = $query->query( array( 'post_type' => 'page', 'orderby' => 'post_title', 'order' => 'ASC', 'posts_per_page' => -1)); $children = get_page_children(get_the_ID(), $all_pages); foreach($children as $child) { $page = get_post($child->ID); }
Iterate children pages

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.