How to display child pages with thumbnail?

Hello! how to display child pages on the parent to wrap content in html markup? you should print: page name, page image, a small text from this page and a link to this page... I am an aspiring govnokoder in wp and php is little... thanks)
June 14th 19 at 20:11
1 answer
June 14th 19 at 20:13
$args = array(
 'post_type' => 'page',
 'posts_per_page' => -1,
 'post_parent' => $post->ID,
 'order' => 'ASC',
 'orderby' => 'menu_order'

 $parent = new WP_Query( $args );

 if ( $parent->have_posts() ) : ?>

 <?php while ( $parent--->have_posts() ) : $parent->the_post(); ?>
 <h1><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1>
 <?php the_post_thumbnail(); ?>
 <?php the_excerpt(); ?>
 <div class="page-content"><?php the_content(); ?></div>
 <?php endwhile; ?>

 <?php endif; wp_reset_query(); ?>

Find more questions by tags WordPress