[resolved] Category visibility parent & child categories (4 posts)

  1. stupidzbu
    Posted 8 years ago #

    Ok, I've done a search but haven't found a proper answer. I have implemented Cat Vis plugin on my blog and want to start a template Cat file.

    Let's say I have a Parent Category called Politics with ID #1, with child categories called Democrat ID#2 and Republican ID#3. If I want to make a template for all posts under the Parent Category Politics, if I create a category-1.php, will that also work for all the child categories under Politics?

  2. Nicki Faulk
    Posted 8 years ago #

    I don't think so. If memory serves me (and I'm still looking for a confirmation), unless you have a category-specific template (such as category-1.php) other categories would use the default template.

    There's more info on the Codex.

  3. Kafkaesqui

    Posted 8 years ago #

    Two options:

    1. Just make copies of category-1.php, calling them category-2.php and category-3.php.

    2. A plugin can be your friend:

  4. stupidzbu
    Posted 8 years ago #

    awesome.. great plug-in..

    I ran into some problems because I was originally including the following code:


    And when I clicked on the children, it would give me a 404 error. I then realized that if I just used:


    It would give me the design I was looking for for the children!

Topic Closed

This topic has been closed to new replies.

About this Topic