Forums

Duplicate Subcategory Slug problem (3 posts)

  1. spacecrusader
    Member
    Posted 1 year ago #

    Hello,

    I created two categories called: Shoes & Boots

    If I create a subcategory under each called "Red", the second one has the URL slug of "Red-2" and not "Red". I cannot change it from "Red-2" to "Red".

    Is there any way to fix this problem? I need this to work.

  2. keesiemeijer
    moderator
    Posted 1 year ago #

    You cannot have the same slug because the slug is part of the url. From the codex:

    Slug
    Slugs are meant to be used with permalinks as they help describe what the content at the URL is. The Category slug must be unique. The Category Slug is used in the URL

    So you cannot have http://www.mydomain.com/category/Shoes-&-Boots/red twice. (because the internets would explode)

  3. jsims281
    Member
    Posted 1 year ago #

    I have the same problem:

    You can't even have "shoes/red" and "boots/red".

    One logical way to do it in my mind would be to create a unique slug of "shoes/red" and "boots/red" (and forget about subcategories) but the / will get stripped out.

    Does anyone know of a way of achieving this?

Topic Closed

This topic has been closed to new replies.

About this Topic