Forums

1 Category Template for the Parent and Child categories? (8 posts)

  1. iamPariah
    Member
    Posted 6 years ago #

    Is there a way to make a single template that applies to a category and all its child templates?

    Thanks!

  2. moshu
    Member
    Posted 6 years ago #

    I am not 100% sure, but it's worth to take a look at this thread:
    http://wordpress.org/support/topic/39740

  3. leliathomas
    Member
    Posted 6 years ago #

    I would assume you just have to use a category template.

    Hope that helps you,
    Lelia Katherine Thomas
    http://www.leliathomas.com

  4. moshu
    Member
    Posted 6 years ago #

    Maybe I misread the OP, but seeing the words single template I thought it is about the single post view. In which case the category template doesn't work as desired.

  5. iamPariah
    Member
    Posted 6 years ago #

    What I'm trying to do is use templates with the proper names (category-#.php where # is the cat ID) to cover each of several categories, but also their child categories. Child categories have their own cat ID numbers, so I'm having trouble making a child use it's parent template.

    For example:
    -------------------------
    ID Name
    -------------------------
    1 Mom Category
    2 -- Little Billy Sub-Category
    5 -- Little Suzi Sub-Category
    3 Dad Category
    4 -- Baby Francis Sub-Category
    -------------------------

    In the above circumstances, I want to create two category specific templates--category-1.php (Mom Category) and category-3.php (Dad Category). These will apply to Mom and Dad, respectively. However, I also need Mom's category-1.php to apply to her children, Little Billy Sub-Category (cat ID 2) and Little Suzi Sub-Category (cat ID 5). Then Dad's category-3.php template covers the Dad Category (cat ID 3) AND Baby Francis Sub-Category (cat ID 4).

    I've got multiple writers working on the system, each assigned to a parent cateogory. They will be adding and removing their sub-categories as needed, but must rely that their sub-categories and individual post pages will use the assets (template, graphics) of their main or parent category.

    Any help on making this one work?

    Thanks!

  6. lellie
    Member
    Posted 6 years ago #

    I'd love this too - anyone get it to work?

  7. tbrams
    Member
    Posted 6 years ago #

    I am not sure if this is what you are looking for, but I built a similar system for my static pages some time ago.

    See this link: <http://brams.dk/technotes/wordpress/my-first-plugin/> - you should find explanation in the php file as well.

    Kind regards
    Torben Brams

  8. lellie
    Member
    Posted 6 years ago #

    not really what I'm looking for but could be helpful - that will allow me to do some of what I wanted to do.. :) thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.