woocommerce offtopic – 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 collection looks like /product-category/category2/ . I want to remove the “product-category” part so my archive page will be /category2/ I think I can do that by setting ‘./’ in the permalink settings.

but what if i already have a normal wordpress page with slug/category 1 and want to redirect to this page (without product-category not woocommerce/product-category/category1) but i still want to redirect to /category 2 want to have a woocommerce collection.

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

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

Is it possible to do this, I haven’t tried because I fear to break my site. Hope you can give me advice, thanks.

Leave a Comment