Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function is_subcategory_of($category = null, $parent = null) {
- if (is_category()) {
- if (null != $category){
- $cat = get_category($category);
- }else{
- $cat = get_category(get_query_var('cat'),false);
- }
- if ($cat->parent == $parent ){
- return true;
- }else{
- return false;
- }
- }
- return false;
- }
- if(is_category()){
- if (is_category(3)) {
- include TEMPLATEPATH . "/archive-blog.php";
- } else if (is_subcategory_of(null, 3)) {
- include TEMPLATEPATH . "/archive-subcat.php";
- } else {
- include TEMPLATEPATH . "/archive-geral.php";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement