Thanks! So using this Query Generator I’m trying out the following code:
<?php
$args = array (
'post_parent' => '70',
'order' => 'ASC',
'orderby' => 'menu_order'
);
// The Query
$query = new WP_Query( $args );
// The Loop
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();
?>
<div class="content-front-page-i-cont" id="<?php echo the_title(); ?>">
<?php the_content(); ?>
</div>
<?php
}
} else {
?>No posts found<?php
}
// Restore original Post Data
wp_reset_postdata();
?>
This doesn’t retrieve any posts. If I do page_id
instead of post_parent
I can retrieve the parent page. I double checked and there are several pages that are using the queried page as a parent.