I want to create custom page for category and single page for specifed category with its children .
First , to create custom single page i've used this code
if (in_category('blog')){
include (TEMPLATEPATH . '/single-blog.php');
}elseif(in_category('projects')){
include (TEMPLATEPATH . '/single-projects.php');
}
else{
include (TEMPLATEPATH . '/single-default.php');
}
and it work fine just for specifed ctegory in the code and doesn't support the children of category.
fo example : i would like to use single-blog.php
for single page of posts that its category is blog
or children of blog
.
Second , for category page i want to do the same things that i've explained above for list of category's posts .
fo example : i would like to show the list of posts that is related to blog category or its children in category-blog.php
.
how can i do it.