Allow duplicate sub terms in custom taxonomies

  1. Henry


    If I set up a custom taxonomy called Fashion and set up a top level term and some second level terms I get:

    Top level term: Men
    Second level terms: Bags, Shirts, Trousers
    URL: example.com/base/men/bags

    However, when I create a new top level term (let us say 'Women') and some second level terms - one of which is identical to a second level term I have already set up under 'Men' I get a slightly different URL


    As you can see if you have duplicate second-level terms in a custom taxonomy WordPress doesn't like it very much and modifies the slug so that that second-level term is unique.

    It would be great to be able to have both




    Posted: 7 years ago #
  2. It has to do with the possibility of you moving the bags from women to men. If they both have the slug 'bags' then WP has no way of knowing which one you meant, so they must be unique.

    Posted: 7 years ago #
  3. Henry


    Hi Mika,

    The 'possibility' of someone moving a sibling term to a different parent is stopping WordPress from having great URLs.

    If someone decides to move a sibling term to a different parent (which already has a sibling term with the exact same slug as the sibling that is being moved) then surely a prompt to rename the sibling can be put in place?

    Posted: 7 years ago #
  4. They still have to have unique slugs, though. So no, a simple rename won't be the solution :(

    That said, you shouldn't be using categories and tags for 'great urls' anyway. The great URL is for your post, which shouldn't have either term in it's normal slug.

    Posted: 7 years ago #
  5. Henry


    WordPress is now considered much more than a simple blogging tool (categories, tags and post slugs). I'm not talking so much about these.

    The idea is directed more towards WordPress as a CMS, especially if taking advantage of custom post types and taxonomies.

    Imagine a site with URLs like this:


    Then imagine a site with URLs like this:


    The URLs in the second example are so much cleaner and much more appealing for any website using WordPress as a CMS.

    Posted: 7 years ago #
  6. Unless these are all the same posts, I would be using Custom PostTypes for that and not categories or tags.

    Posted: 7 years ago #
  7. serpyre

    There is a plugin "Duplicate Category Paths" that does this for all taxonomies including categories, WooCommerce product categories, etc. for 3.x. It removes the base if necessary so that it is a clean url.


    Posted: 6 years ago #
  8. bigj9901

    I have seen you mention the Duplicate Category Paths plugin in other posts but have not been able to find it. Link?

    Posted: 6 years ago #
  9. serpyre

    If you search "Duplicate Category Paths" with the quotes you will find it in Google.

    Posted: 6 years ago #
  10. bigj9901

    I found it but the page doesn't say anything about how it works. Can you provide any insight?

    Posted: 6 years ago #

RSS feed for this topic

Reply »

You must log in to post.

  • Rating

    1 Vote
  • Status

    Duplicate of another idea