• Eyal_bin

    (@eyal_bin)


    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)
  • Marvel Labs

    (@royalprince)

    Hi,

    You can change the permalinks to postname only in dashboard > settings > permalinks

    Thread Starter Eyal_bin

    (@eyal_bin)

    Ha??? your answer has nothing to do with question? or maybe I didn’t understand…

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