step 1, open function.php in the theme folder and add following code:
function wpb_list_child_pages(){
global $post;
if ( is_page() && $post->post_parent )
$childpages = wp_list_pages( 'sort_column=menu_order&title_li=&child_of=' . $post->post_parent . '&echo=0' );
else
$childpages = wp_list_pages( 'sort_column=menu_order&title_li=&child_of=' . $post->ID . '&echo=0' );
if ( $childpages ) {
$string = '<ul>' . $childpages . '</ul>';
}
echo $string;
}
add_shortcode('wpb_childpages', 'wpb_list_child_pages');
add_filter('widget_text', 'do_shortcode');
step 2, Edit the main page.php, in this example, it is “content-page.php”.
add the following in the code before or after <?php the_content(); ?>:
<?php wpb_list_child_pages(); ?>
Another way is to add [wpb_childpages] in a text widge,which can be in the page or side bar, or footer, header.