• I want to create categories according to the following structure:
    Industry -> News
    PHP -> News
    Whatever -> News
    However, WordPress doesn’t seem to allow me the ability to create a category with the same name as another category (even though the DB IDs are different and they don’t belong to the same parent). I suppose I could directly edit the DB, but is there a way to do this through the interface?

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

    (@benramsey)

    I can’t even directly edit the database because the schema doesn’t allow duplicate entries.
    So, I guess there’s no way to do this?

    You could remove the UNIQUE restriction, although I don’t know if that would break anything… (try it and see! :)), since it’s not the primary key, it shouldn’t be being used elsewhere…
    Or you could, if this is acceptable, fake it, with “News”, ” News”, and ” News”… they do have to be leading spaces… trailing spaces are removed by default (in MySQL)… I didn’t test this in the interface, but it worked from the mysql prompt.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Creating children categories with the same names’ is closed to new replies.