Display only children posts within a custom taxonomy
-
Hi
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).
E.g.
Level 1 > Level 2a > products
Level 1 > Level 2b > productsThe 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 ??
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Display only children posts within a custom taxonomy’ is closed to new replies.