Hi, i am trying to make a template that displays all the childpages with the feautered image and the excerpt.
This is what i got:
<?php
$child_pages = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = ".$post->ID." AND post_type = 'page' ORDER BY menu_order", 'OBJECT'); ?>
<?php if ( $child_pages ) : foreach ( $child_pages as $pageChild ) : setup_postdata( $pageChild ); ?>
<div class="child-thumb">
<h2><?php echo $pageChild->post_title; ?></h2>
<a href="<?php echo get_permalink($pageChild->ID); ?>" rel="bookmark" title="<?php echo $pageChild->post_title; ?>"><?php echo get_the_post_thumbnail($pageChild->ID, 'excerpt-thumbnail'); ?></a>
<?php echo '<p>'.$pageChild->post_excerpt.'</p>'; ?>
</div>
<?php endforeach; endif;
?>
I want the image the be hard croped with 240x140 px but i can't get that to work. I also want to display the excerpt of the page child.
Ty in advance!