Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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, // Appears to have no effect when used. Shows all descendants, not filtered by taxonomy or term.
- '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(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement