WordPress.org

Forums

Hierarchical Taxonomy Slugs/URLs are not hierarchical? (5 posts)

  1. beeblesox
    Member
    Posted 3 years ago #

    Ok, so you can make regular categories very deep:

    /category/cat1/cat2/cat3/cat4/etc/
    The admin menu shows them nested, and the URLs show this hierarchical structure.

    With custom hierarchical taxonomies, the admin view shows them as nested, however the URLs are only 1 level deep.

    The admin interface shows them correctly:

    CustomTax
        TaxCategory1
        TaxCategory2
            TaxCategory2-1
            TaxCategory2-2
        TaxCategory3

    The URLs should be:
    /customtax/taxcategory2/ and
    /customtax/taxcategory2/taxcategory2-1/

    However, they are created like so:
    /customtax/taxcategory2/ and
    /customtax/taxcategory2-1/ (this is at the taxonomy's 'root' level, instead of nested inside its parent)

    ... sigh... I've tried googling and searching this forum, to no avail.

  2. beeblesox
    Member
    Posted 3 years ago #

    anyone?

  3. sanch3x
    Member
    Posted 3 years ago #

    Googling sent me here. Were you able to get an answer?

  4. beeblesox
    Member
    Posted 3 years ago #

    Nope, I think that's the way its "supposed" to work. You could go dig through the slug creation functions and compare the custom taxonomy function to that of the normal categories.

    Good luck :P

  5. sanch3x
    Member
    Posted 3 years ago #

    I was able to get it running with the answer found here:

    http://wordpress.stackexchange.com/questions/39500/how-to-create-a-permalink-structure-with-custom-taxonomies-and-custom-post-types

    It's a little elaborate and I wasn't able to get the permalink structure working for everything but I did hack up a solution that served my needs. Hope that helps anyone who gets lead here by Google (like I did).

Topic Closed

This topic has been closed to new replies.

About this Topic