I am creating a site with a custom taxonomy, and custom post types. The could be several levels to the taxonomy, with the lowest level containing the custom post types (the products).
Level 1 > Level 2a > products
Level 1 > Level 2b > products
The problem I am having is that I can’t hide the products when I am viewing Level 1. For some reason it is displaying the products from Level 2a and 2b as well.
This is the code I am using:
<?php $recent = new WP_Query(“post_type=product&customtaxonomy=$slug&posts_per_page=$posts_per_page”); ?>
<?php while($recent->have_posts()) : $recent->the_post();?>
Many thanks for any tips 🙂
- The topic ‘Display only children posts within a custom taxonomy’ is closed to new replies.