I have this code in my "Single.php":
<?php
if ( in_category('3') ) {
include 'single_article.php';
}
elseif ('category_parent=9') {
include 'single_teacher.php';
}
else {
include (TEMPLATEPATH . '/index.php');
}
?>
And it work's great to make every post under category3
use "single_article.php" and every post under the category 9 or under one of it's subcategories use the "single_teacher.php".
But when I try to add another template for posts
under category 15 or it's subcategories like that:
<?php
if ( in_category('3') ) {
include 'single_article.php';
}
elseif ('category_parent=9') {
include 'single_teacher.php';
}
elseif ('category_parent=15') {
include 'videolessons.php';
}
else {
include (TEMPLATEPATH . '/index.php');
}
?>
It's just take the "single_teacher.php" even
for the posts under category 15.
Any Idea?