• Resolved stupidzbu

    (@stupidzbu)


    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?

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.

    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:
    https://www.ads-software.com/support/topic/58382#post-315039

    Thread Starter stupidzbu

    (@stupidzbu)

    awesome.. great plug-in..

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

    is_category(18)

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

    is_category()

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Category visibility parent & child categories’ is closed to new replies.