Site logo

Archived topic

Woocommerce URLs issue

3 replies · Started by Sebastian on December 24, 2021

Viewing posts 1–4 of 4

Hello,

The problem I am having is not related to GP.

I would like to create categories and subcategories according to a scheme with URLs. Example:

Woocomerce:
Category name (URL)

Parent: Designer (designer) - test.com/designer/
Sub: Designer New York (new-york)

test.com/designer/new-york/

Second sample category:

Parent: Web Designer (web-designer)
Subcategory: Web Designer New York (new-york)

Every time I save the creation of the second subcategory, the url changes automatically to web-designer-new-york

For example, when we create pages in the page editor, there is no such problem because each page has a parent and wordpress does not treat this as a duplicate.

Is there a simple solution to do this?

Thank You

Hi there,

i really don't know if there is a solution for that.
WordPress requires a unique slug for each category term - For example when you create:

test.com/designer/new-york/

The same page should be reachable with just:

test.com/new-york/

Which is why duplicated category terms have to have different slugs.

The only solution i can think of is to NOT use a sub-category but instead use another taxonomy or attribute for that. Which could be common to all products. But then you may require a developer to create some rewrite rules for the slugs.

Thank You for the answer

You're welcome

This archived topic is closed to new replies.