2

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?

3
  • "physics" must be unique because it is the post_name ('slug') and does not depend on any taxonomy.
    – Max Yudin
    Commented Jan 21, 2017 at 12:24
  • so my only option is to rename the slug? Commented Jan 21, 2017 at 22:26
  • I am also stuck in this. Did you get any solution? Commented May 17, 2018 at 16:29

1 Answer 1

0

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.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.