is there a “redirect to template path” instead of the “include templatepath”?
-
Is there an option to the “include(template…” bit in the code below?
<?php $id = get_parent_category(); if ($id == 20) { include(TEMPLATEPATH . '/category-'. $id . '.php');} else { ?> <?php } ?>
I would like to REDIRECT wp to the custom category-“id” template that I wrote. Instead, it looks like it is including the category-“id” template, and then continuing on with the original one – much like a sidebar or footer! You can see it in action at: /category/recipes If you click on any of the subcategories, you’ll see what I mean. (Except on the misc recipes subcat – NO IDEA why!)
Am I way off base here?
Thanks for any help,
Cathy
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘is there a “redirect to template path” instead of the “include templatepath”?’ is closed to new replies.