Web Burner
Web Burner

Reputation: 1

How to Remove "product-category" from URLs Without Breaking Category Pages in WordPress?

I want to remove "product-category" from my WooCommerce category URLs. Currently, my URLs look like this: ❌ mywebsite.com/product-category/category I want them to be: ✅ mywebsite.com/category

Additionally, I want my product URLs to be formatted as: ✅ mywebsite.com/category?product

I removed the "product-category" base by adding a (.) in the Product Permalink settings. I updated the Custom Structure in Permalink settings to: /%category%/%postname%/ This successfully removed "product-category" from the URL.

Issue:

After making these changes, my category and subcategory pages stopped working, showing the error: 🚨 "Oops! That page can’t be found." When I reverted to the default permalink structure, the issue was resolved, but "product-category" returned. I also need a way to structure product URLs as mywebsite.com/category/product. How can I properly remove "product-category" from category URLs and structure product URLs as desired without breaking anything?

Upvotes: -5

Views: 38

Answers (0)

Related Questions