This is probably an extremely easy one but I can’t get it to work even after browsing the support forums/help pages.
I have several categories and sub-categories. When I click a category it will output all posts from that category and sub-categories in THE LOOP.
<?php while (have_posts()) : the_post(); ?>
<— do stuff —>
<?php endwhile; ?>
But when I click the parent category I just want it to show the posts in that category ONLY and not posts in its’ sub-categories/children categories.
Aren’t I supposed to just add, for example, this above:
<?php query_posts(‘cat=4’); ?>
if I just want to list posts from category 4 in the loop?
But it still lists posts in category 4 and all it’s sub-categories (which have ID 16,17,18 and 19).
Am I missing something? Running WordPress 2.0.4.
- The topic ‘Skip sub-categories in The Loop?’ is closed to new replies.