There is still much to be desired within WordPress when it comes to dealing with parent and children pages. The core code is there, and it’s usable, but there’s not a lot “out of the box” to play with.
We’ve developed a bit of code to help make your life a little easier.
Adding the code below to your functions.php file will let you remove the other children pages while on the parent page.
add_filter('wp_list_pages_excludes', 'remove_others_children');
function remove_others_children($excludes = array()) {
$all_pages = get_pages();
$all_children = (array) get_page_children(true, $all_pages);
foreach ( $all_children as $child )
$excludes[] = $child->ID;
if ( ! is_page() )
return $excludes;
global $post;
$this_heirarchy = (array) $post->ancestors;
$this_children = (array) get_page_children($post->ID, $all_pages);
foreach ( $this_heirarchy as $ancestor )
$this_children = array_merge($this_children, (array) get_page_children($ancestor, $all_pages));
foreach ($this_children as $child)
$this_heirarchy[] = $child->ID;
return array_diff($excludes, $this_heirarchy);
}
Here are some examples of what it would like without the code, then with the code.

A huge thanks goes out to Matt Martz for working with us on helping get this code ready.
Wow, can’t wait to test this out, I’ve been looking for something similar for a couple of weeks, great timing
Thanks!
Sure thing! Glad I could help. I’m hoping to come up with some variations of it too, in the near future, to have more flexibility with pages and children pages. That’s one thing I feel is still lacking, is flexibility.
Hi Jonathan, really thanks for sharing this piece of code. Very useful. If there was a need, I was always using different is_page() || $post->post_parent conditions to achieve this behaving, but your solution is just perfect. I’ve just tested it and seems to be working all sexy.
Lifesafer!
Perfect solution!
Hi Jonathan.
I’ve been searching for this trick for hours. You just saved me from having to research the function and write it myself. I’ve implemented the code on my blog and will be giving you a write-up within the next couple of hours. I hope you don’t mind that I’ve reprinted your code on my blog, if this is a problem just let me know and I will remove it.
Once again, many thanks for a great piece of code.
Sure thing! Glad we could help. All that I ask is that you link back here, that’s all
This rocks! Thanks!
Wonder if you should drop a reference to this here:
http://codex.wordpress.org/Template_Tags/wp_list_pages