Wp get all the sub pages of the parent using wp query
Why not just use get_pages()? e.g. <?php // Determine parent page ID $parent_page_id = ( ‘0’ != $post->post_parent ? $post->post_parent : $post->ID ); // Get child pages as array $page_tree_array = get_pages( array( ‘child_of’ => $parent_page_id; ) ); ?> But if it really must be as a WP_Query() object, use a similar method: <?php // … Read more