remove product-category base but still redirect to page with same permalink


I’m using Woocommerce plugin,
currently I don’t set anything in “Product category base”, so my woocommerce archive looks like /product-category/category2/.
I want to remove “product-category” part away so my archive page will be /category2/
I think I can do that by set ‘./’ in permalinks settings.

But what if I already have a normal WordPress page with a slug /category1 already and want to redirect to this page (not woocommerce /product-category/category1 without product-category) but I still want /category2 is a woocommerce archive.

  • When I enter /category1 -> redirect to a normal page with this permalink (eventhough I still have /category1 archive page but not use it).

  • When I enter /category2 -> redirect to Woocommerce archive category2 (because I don’t have any page with the same permalink).

Is it possible to do it, I have not tried cuz I’m affraid of breaking my site.
Hope you can give me advice, Thanks.

, Yoona 3 years 2020-06-05T04:11:09-05:00 0 Answers 99 views 0

Leave an answer