This will get you the post data for all child pages:
$args = array(
'post_type' => 'page',
'post_parent__not_in' => array(0),
'no_found_rows' => true,
);
$child = new WP_Query($args);
var_dump(wp_list_pluck($child->posts,'post_title')); // debugging only
Then pass the IDs to wp_list_pages()
:
$args = array(
'post_type' => 'page',
'post_parent__not_in' => array(0),
'no_found_rows' => true,
);
$child = new WP_Query($args);
$ids = wp_list_pluck($child->posts,'ID');
$ids = implode($ids,',');
$args = array(
'include' => $ids,
);
wp_list_pages($args);
Or, even cleaner:
$args = array(
'post_type' => 'page',
'post_parent__not_in' => array(0),
'no_found_rows' => true,
'fields' => 'ids'
);
$child = new WP_Query($args);
$args = array(
'include' => $child->posts,
);
wp_list_pages($args);
Please note that there is no error checking to that code.
I’ll see if I can spot a clean way to do this with filters. Check back later.