WordPress.org

Support

Support » How-To and Troubleshooting » categories with same name, different parents

categories with same name, different parents

  • Is it possible to have two categories with the same name, but with different parents?
    e.g.
    Parent = test1, category = cat1
    Parent = test2, category = cat1
    It seems not, I get a dupe key error:
    WordPress database error: [Duplicate entry ‘test1’ for key 2]
    INSERT INTO wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES (‘0’, ‘test1’, ‘test1’, ”, ‘6’)
    Thanks.

Viewing 1 replies (of 1 total)
  • I always put a space in front of the category, in my category system I have 5 parent categories (including general), and around 3-5 subcategories under four of the parents. Since wordpress doesn’t really have a good category organization system. I start from the top (I have 5 categories plus 3 subcategory groups), so I name the category that appears at the top with 8 spaces, then the second category group with 7 spaces, all the subcategories with 6 spaces, and so on until the last set of subcategories which get no spaces in front.
    There might be a better way to do this but I just approach it that way. =)

Viewing 1 replies (of 1 total)
  • The topic ‘categories with same name, different parents’ is closed to new replies.
Skip to toolbar