How to create unique slugs for city based services
-
Hi,
I’m providing city-based services. I have 2 cities city-1 and city-2 which I created as parent categories. I want to create a category called /birthday in both the cities, but wordpress doesn’t allow to create duplicate slugs even if the whole URL is unique.
Desired URL:
/city-1/birthday
/city-2/birthday
/city-1/birthday/decorations
/city-2/birthday/decorations
What wordpress is creating:
/city-1/birthday and
/city-2/birthday-2
/city-1/birthday/decorations
/city-2/birthday-2/decorations-2
I need the solution to get the desired URL and if there is any way that I can do it through any of the woodmart themes. I have been trying myself for a solution from many days but couldn’t find. Please help me with the right solution. Thanks in advance.
Hello,
Unfortunately, WordPress doesn’t allow duplicate slugs for categories; this is part of WordPress’ default permalink structure.
You need to find a third-party plugin to achieve more functionality that best suits you.
https://wordpress.org/plugins/custom-permalinks/
Best Regards,
Thanks for the information. I have used plugin to solve this.
Hello,
Great! I’m glad to hear you were able to solve the issue using a plugin.
If you have a moment, we’d really appreciate your feedback — it helps us improve the theme and shape future updates: https://tally.so/r/w4l54k
Thanks again for contacting us.
Topic Closed.
Best Regards,
The topic ‘How to create unique slugs for city based services’ is closed to new replies.