• I have several posts that are under several sub categories of sub categories (3rd level), and of course, one parnet category above all of them.

    I want to make a special single.php page for all of the posts, but the

    <?php if(in_category($id)) { include 'special-single-page.php'; } ?>

    only works for posts directly under that category and not for posts that are in sub categories of sub categories.

    Is there a way to include a file for posts that are under several sub categories of the parent category?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘including template file for posts in sub categories’ is closed to new replies.