Child Categories
-
Hi all,
I was wondering if it is possible to have an ‘if /else’ query for children of categories?
Rooting around the codex I found this and was wondering if it were possible to get something that would allow you to ‘do stuff’ for all categories that were children of category 9, for example, and then ‘do something else’ for all other categories.
<?php if (is_category(9)) { // looking for category 9 posts include(TEMPLATEPATH . '/single2.php'); } else { // put this on every other category post include(TEMPLATEPATH . '/single1.php'); } ?>
Any help, as ever, greatly appreciated.
Cheers.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Child Categories’ is closed to new replies.