[Woocommerce] Static path optimization

By default, when installing Woocommerce, you may see that the products have not very beautiful links, but if you want the product paths and the product categories and product keywords to be more beautiful, we should Enable static path for Woocommerce. In this article, I will talk about how to install and some tips related to static path optimization.

Should see: Learn static paths in WordPress.

Set up static path for Woocommerce

To set this function, you must go to [textmarker color=”247BFF”]Settings -> Static Path[/textmarker].

woocommerce-permalinks-01

[Woocommerce]  15 . static path optimization

Then, in the general settings, you have to select the calculated path structure for WordPress first to enable the feature.

woocommerce-permalinks-02

And in the extra options section, you will see it has more sections for the product including:

  • Default product category: Means the facility name on the path to the product catalog pages. For example, the path to the directory will be https://TechtipsNReview.com/danh-muc-san-pham/quan-jean/ then part danh-muc-san-pham is the base name for the category. For some reason you should set it as muc-san-pham or something not danh-muc-san-pham because it will get 404 error if given this name.
  • Default product keyword: Same as above but for product keyword pages.
  • Default product attribute: Same as above but for archive pages for product attributes.

Attention, friends Do not use Vietnamese with accents. I will change it to the following so that I don’t get the error:

[Woocommerce]  15 . static path optimization

woocommerce-permalinks-03

And below that is the Default static link of the product or in other words easier to understand the static path structure for the product page. Here you can choose the structure you like but avoid choosing the structure with Vietnamese accents as it will be error. For example, I want my path to be https://TechtipsNReview.com/san-pham/quan-levis will be set as follows:

See more:  [Woocommerce] Create products with attributes

woocommerce-permalinks-04

Or if I want the product path to contain the product category name of that product, set it up as follows:

[Woocommerce]  15 . static path optimization

woocommerce-permalinks-05

Clear product category defaults and product defaults

I just wrote that to match the translation, but to be precise, remove the base name for the product and category paths. Above you have seen that every time we go to the link of the product catalog, there will be more /muc-san-pham/ on the link and for the product there will be more /san-pham/. If you want to remove those two then install these two plugins in turn.

The first is to install Remove Taxonomy Base Slug enter and activate. Then you enter [textmarker color=”247BFF”]Expansion Pack -> Remove Taxonomy Base Slug [/textmarker]and chooseproduct_cat and product_tag (press shift to select) and press Apply Changes.

woocommerce-permalinks-06

[Woocommerce]  15 . static path optimization

Finally in [textmarker color=”247BFF”]Settings -> Static Path[/textmarker] Click the Save Changes button again to flush the permalink.

Next is to install the plugin Remove slug from custom post type enter and activate up, then enter Settings -> Static Path and press the Save Changes button.

Add .html to the product

When installing the Remove slug from custom post type plugin above, the plugin already has a feature to support adding suffixes to the path. You go to Settings -> Custom post type and enter html into it.

wc26-them-html-url

[Woocommerce]  15 . static path optimization

Then enter [textmarker color=”247BFF”]Settings -> Static Path[/textmarker] and press the save changes button for it to update. Now go back to the website homepage and click on the product to see the product already has .html in the tail.

See more:  [Woocommerce] Power up with YITH Essential Kit for Woocommerce

Epilogue

Those are some of my experiences in optimizing Woocommerce’s URL, the first is to make it more beautiful and of course, the second is for the path structure to be SEO-friendly, isn’t it. I wish you success with your business.


Source: [Woocommerce] Static path optimization
– TechtipsnReview

, , ,

Leave a Reply

Your email address will not be published. Required fields are marked *