I am trying to display the DIRECT children of another page on the homepage but I can't seem to get it working it just shows all of the page titles on the site..
It needs to be within a wp_query as I require to use advanced custom fields on the pages
<?php $the_query = new WP_Query( array( 'post_type' => 'page', 'parent' => 42, 'child_of' => 0,) ); while ( $the_query->have_posts() ) : $the_query->the_post(); echo '<h3>'; the_title(); echo '</h3>'; echo '<p>' ; the_field('enter_stuff_here'); echo '</p>'; endwhile; wp_reset_postdata(); ?>
My understanding was if I used the ID of the parent that this would show all of the DIRECT children of this page (please note I don't want t o show grandchildren but ONLY DIRECT child pages)
Thanks in advance for the help!