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

佐手、 提交于 2019-11-30 11:21:31

Its good practice for SEO and UX to have a product category base. Product category bases help to distinguish products from posts. I usually change the product category base to "our-products" or "products".

To do this go to settings->permalinks-> enter your desired product category base.

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?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!