• Resolved zigzagad

    (@zigzagad)


    I need to create a theme to display products broken into categories.

    I’ve created a custom post type of ‘product’ and a custom taxonomy of ‘producttype’.

    My structure is along these lines:

    products page
    category01
    subcategory01
    product01
    product02
    subcategory02
    product03
    product04
    category02
    subcategory03
    product05
    etc…

    The tree won’t go deeper than this.

    I’ve created a page with a custom template that displays all the top level ‘producttype’s which has the permalink:

    mysite.com/products

    If I click ‘category01’ my permalink is:

    mysite.com/products/category01

    So far, so good. Now, from that page, if I click ‘subcategory01’ I get a page displaying ‘product01’ and ‘product02’ as expected, but its permalink is:

    mysite.com/products/subcategory01

    rather than:

    mysite.com/products/category01/subcategory01

    Any pointers on how I would fix that please?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter zigzagad

    (@zigzagad)

    Sorry, the forum has removed the tabbing I’d put into the structure to make it easier to understand, I hope it’s still clear enough.

    Thread Starter zigzagad

    (@zigzagad)

    I’m getting somewhere now…

    I had to add ‘hierarchical’ => true to the args when registering the taxonomy

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Creating templates for custom taxonomy’ is closed to new replies.