Can anyone please help me to with the wp_query.
I am making a template file/loop to create and archive page of the current page children pages.
This query needs to be automatic as I am using in on few pages.
This is my query below, but it just returns my posts instead of child pages.
<?php
$parent = new WP_Query(array(
'post_parent' => $post->ID,
'order' => 'ASC',
'orderby' => 'menu_order',
'posts_per_page' => -1
));
if ($parent->have_posts()) : ?>
<?php while ($parent->have_posts()) : $parent->the_post(); ?>
<div id="parent-<?php the_ID(); ?>" class="parent-page">
<h1><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
<p><?php the_advanced_excerpt(); ?></p>
</div>
<?php endwhile; ?>
<?php unset($parent); endif; wp_reset_postdata(); ?>
Thanks in advance for any help.
Josh