The given PHP example list the sub pages of a current page in WordPress. Code Example:
<?php function list_sub_pages() { global $wp_query; if( empty($wp_query->post->post_parent) ) { $parent = $wp_query->post->ID; echo "<h3>".get_the_title($parent)."</h3>"; } else { $parent = $wp_query->post->post_parent; echo "<h3><a href='".get_permalink($parent)."'>".get_the_title($parent)."</a></h3>"; } echo '<ul>'; wp_list_pages("title_li=&child_of=$parent" ); echo '</ul>'; } ?>