Can two products with the same name but different category produce unique URLs?

In the permalinks settings I have /courses/%product_cat%. Using WooCommerce I created two different Courses that are named “English”, but they have different categories that end up making my urls look like this:

https://www.example.com/demo/chla/courses/grade-11/physics/
https://www.example.com/demo/chla/courses/grade-12/physics-2/

The Grade 12 URL is not ideal with the “-2” attached onto “physics”. Is there anything I can do to remove that?

1 Answer
1

You get this behavior as following:

  • Create a page as category name.
  • A product page, make it child of your category.
  • Use [product_page id="0"] to display a product.

You can now use the same product name in different categories.

Leave a Comment