Help Understanding Category Structure + Code Help (1 post)

  1. CodeyMonkey
    Posted 4 years ago #


    I'm trying to see how categories work together, and wondered if you could see if i'm doing this right.

    I'm creating a portfolio website and need the structure like this:

    (My permalink structure is "/%category%/%postname%/"

    Parent Category: mysite.com/portfolio/
    Child Category: mysite.com/portfolio/photography/
    Single Post Entry mysite.com/portfolio/photography/single-post-url

    Child Categories can not be hard coded, e.g. category_photography.php

    So I need code that says something like:

    If Category is a "Parent" then show this code.... else.... Show the children code....

    All this is within category.php....

    Hope someone can assist.

Topic Closed

This topic has been closed to new replies.

About this Topic