if ( is_category() ) { global $wp_query; $cat_obj = $wp_query->get_queried_object(); $thisCat = $cat_obj->term_id; $cate_id = $cat_obj->term_id; $cate_parent = $cat_obj->parent; $cate_level = get_category($cate_parent); $cate_level_id = $cate_level->parent; } if($cate_id == 2 || $cate_parent == 2 || $cate_level_id == 2) { include_once TEMPLATEPATH.'/cate_sp.php'; } else { include_once TEMPLATEPATH.'/cate_news.php'; } ?>