I'm trying to use query_posts to list all descendants of a page ID. Using post_parent only lists the first-level children.
This Trac ticket seems to address it: http://core.trac.wordpress.org/ticket/5742, but I don't understand it -- post_parent only lists the first-level children.
<?php
query_posts( array(
'post_parent' => 58, // Only shows posts that are direct children of the Machinery page. I want all descendants.
//'child_of' => 58, // When used, shows posts filterd by taxonomy and term, but not filtered by child of ID 58. Acutally omits direct child of 58 but shows grandchild.
'post_status' => 'any',
'post_type' => 'any',
'taxonomy' => 'industries',
'term' => 'dairy'
));
?>
<?php if ( have_posts() ) : ?>
<h4>Dairy Machinery</h4>
<ul>
<?php while (have_posts()) : the_post(); ?>
<li>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</li>
<?php endwhile; ?>
</ul>
<?php endif; wp_reset_query(); ?>
How do I get query_posts to list all descendants of a page ID?