WooCommerce- How to remove product & product-category from urls?

前端 未结 2 1680
梦谈多话
梦谈多话 2021-01-01 18:46

I\'m using WooCommerce on a WordPress and it adds product & product-category to the URLs. http://dev.unwaveringmedia.com/8dim/product-category/all-party-supplies/ http:

2条回答
  •  天涯浪人
    2021-01-01 19:14

    There is an official answer to this in the WooCommerce documentation.

    A snippet:

    Unfortunately this is not possible due to the way WordPress resolves its URLs. It uses the ‘product-category’ (or any other text for that matter) base of an URL to detect that it is an URL leading to a product category.

    There is a bit of followup explanation, and allegedly there are some plugins that make it possible, though it's not recommended.

    You may also be able to 'hack' the core code and just change the strings they use for that permalink structure -- or maybe that's what the elsewhere-mentioned setting is intended to do?

提交回复
热议问题