Permalink Manager allows to remove the permalinks slugs used inside WooCommerce shop permalinks of products, product categories, product tags and product attributes.
Some of the functionalities presented in this post are available only in Permalink Manager Pro.
Buy the plugin here.
This tutorial shows how to remove them from WooCommerce permalinks, but can be used also as a reference to the other custom post types & taxonomies. Below you can find instructions on how to bulk edit the WooCommerce permalinks, but still you can edit them individually. Here you can find more information on how to edit the custom permalinks assigned to single posts or terms.
As you can see, WooCommerce original permalinks contain rewrite bases (“product-category”, “product-tag” and “product”):
# Product categories: http://my-woocommerce-shop.com/product-category/polos/ http://my-woocommerce-shop.com/product-category/t-shirts/ # Product tags: http://my-woocommerce-shop.com/product-tag/cotton/ http://my-woocommerce-shop.com/product-tag/wool/ # Products: http://my-woocommerce-shop.com/product/plain-casual-t-shirt/ http://my-woocommerce-shop.com/product/elegant-cotton-polo/
With Permalink Manager we can get rid of rewrite bases and simply shorten them to e.g.:
# Product categories: http://my-woocommerce-shop.com/polos/ http://my-woocommerce-shop.com/t-shirts/ # Product tags: http://my-woocommerce-shop.com/cotton/ http://my-woocommerce-shop.com/wool/ # Products: http://my-woocommerce-shop.com/plain-casual-t-shirt/ http://my-woocommerce-shop.com/elegant-cotton-polo/
It is also possible to set any permalink base, e.g. you can force the same rewrite base for all WooCommerce links:
# Product categories: http://my-woocommerce-shop.com/clothes/polos/ http://my-woocommerce-shop.com/clothes/t-shirts/ # Product tags: http://my-woocommerce-shop.com/clothes/cotton/ http://my-woocommerce-shop.com/clothes/wool/ # Products: http://my-woocommerce-shop.com/clothes/plain-casual-t-shirt/ http://my-woocommerce-shop.com/clothes/elegant-cotton-polo/
Step 1. Replace native permastrucutres with custom ones
The first thing you will need to do after Permalink Manager is installed & enabled is to open the plugin’s dashboard (“Tools -> Permalink Manager“) and go to “Permastructures” tab.
In the bottom, you will find a subsection titled “WooCommerce” where the permastructures for Products, Product Categories and Product Tags can be edited.
Now you can replace the permalink bases: /product/, /product-category/ and /product-tag/ with any word or remove it completely. Please always remember to save the new settings with “Save permastructures” button displayed in the very bottom of the page.
The saved settings will be automatically used for default permalinks of new products, categories and tags. To apply the changes to the old permalinks as well, please follow the instructions in the next step.
Step 2A. Reset permalinks of old products
If you would like to use the new permastructures for old permalinks, please go to another section: “Tools -> Regenerate/reset“.
To reset the Product’s permalinks please set:
- “Mode” to: “Custom URIs“
- “Select content type” to: “Post types“
- “Select post types” to: “Products“
- “Select post statuses” to “Published“
After “Regenerate” button is clicked, a list of updated products’ permalinks will be displayed.
Step 2B. Reset permalinks of old product taxonomies
To reset the Product Categories and Product Tags permalinks please set:
- “Mode” to: “Custom URIs“
- “Select content type” to: “Taxonomies“
- “Select post types” to: “Product tags, Product categories“
As was the case with the Product permalinks, the list of updated permalinks will be displayed after “Regenerate” button is clicked.