im trying to make a list of child pages with the excerpt on a specific page.
here is the code ive got so far
$pageChildren = $wpdb->get_results(“SELECT * FROM $wpdb->posts WHERE post_parent = “.$post->ID.” AND post_type = ‘page’ ORDER BY menu_order”, ‘OBJECT’); ?>
if ( $pageChildren ) : foreach ( $pageChildren as $pageChild ) : setup_postdata( $pageChild ); ?>
endforeach; endif; ?>
I can see the child page titles just fine, but i see the content of the parent page under each title.
my knowledge in php is very little so ill appriciate any help :)