Child Categories With Same Name Different Parent
-
Hi
I’m trying to create categories for my tech website I’m currently setting up and I’ve come across a slight problem with clashing child category names. Now I understand that parent categories can’t share similar names because every slug needs to be unique. However, in theory, child categories with the same name and should still work so long as the parent category is different as this makes up the other half of the URL/slug.
Moreover, the problem I’m facing is that when using categories/taxonomies to filter posts and pages on a widget or plugin such as a post grid I’m using, they never display the categories correctly. I was thinking the categories would be displayed in some form of a hierarchy order with the indentation showing the differentiation between the parent and child categories. Even at a minimum, I was hoping the order of categories listed on the categories organising page would mirror in the widget/plugin.
Here’s an example of the categories that are set in the categories page.
Car
Mercedes Benz
Suzuki
BMW
Renault
Triumph
FordVan
Mercedes Benz
Renault
FordBike
Suzuki
BMW
TriumphAs you can see there are child categories that are shared under multiple parent categories. Luckily that doesn’t pose a problem as the slug will contain the parent category e.g.
https://domain.com/car/mercedes-benz
It’s using a widget/plugin when it becomes an annoyance because the order jumbles up so I may get two child categories listed on top of one another e.g.
Ford
FordSome would say I should try not to use matching child categories, but unfortunately, I can’t get away from this
Is there a way around this please?
Many thanks
Will
- The topic ‘Child Categories With Same Name Different Parent’ is closed to new replies.