global $wpdb, $post;
$results = $wpdb->get_results("SELECT ID, post_title, post_content FROM $wpdb->posts WHERE post_status = 'static' AND post_parent = $post->ID", ARRAY_A);
if (!empty($results)) {
foreach ($results as $result) {
$postID = $result['ID'];
$title = htmlspecialchars($result['post_title']);
$permalink = get_permalink($postID);
$excerpt = htmlspecialchars(wp_trim_excerpt($result['post_content']));
/**
This starts the "mini-loop". Edit the HTML inside here to display the pages
the way you want.
*/
?>
<div class="artist_page_wrap">
<p><a href="<?php echo $permalink; ?>" title="<?php echo $title; ?>"><?php echo $title; ?></a></p>
<p><?php echo $excerpt; ?></p>
</div>
<?php
/**
End of the mini-loop. Don't edit past this point
*/
}
}