Categories with same name and/or slug issue? Solution required.
-
Hello Guys, this is my first post.
Having used these forums time after time for countless problem solving I’m now faced with an issue I cannot resolve.
My blog requires multiple categories of the same name under different parents, however this is not my issue. My problem is the way wordpress automatically assigns the category name as the slug if the slug field is left blank.
To further the issue I require to add categories in bulk for which I have an excellent plugin which allows me to add multiple categories and sub categories at once. However the problem is that it refuses to add categories if a category with that name already exists. Following guidance from these forums I have hacked wordpress so that it checks the cat_nicename (slug) for uniqueness instead but the problem is my bulk category plugin doesn’t support slug fields so it passes through wordpress asif the slug field is left blank allowing wordpress to automatically set the slug.
Further more and something strange, if you add a category with the same name as one that already exists via the wordpress admin panel and not via the bulk editor, wordpress automatically assigns that category with a unique slug based on it’s parents in a sanatized form. This is great and what I need but for some reason when adding cats through the bulk editor it seems to ignore this function that wordpress has of automatically defining unique slugs.
Any help would be much appreciated?
Many Thanks
Jason
- The topic ‘Categories with same name and/or slug issue? Solution required.’ is closed to new replies.