Search code examples
wordpresswoocommercehttp-status-code-404permalinkswiki

WooCommerce product permalink not working


I am using WooCommerce plugin. I have added the product permalink(Settings ->Permalinks) to Custom Base(/shop/%product_cat%) it works fine. But if I updated it to (/%product_cat%) products page working fine but website pages and posts are linking to 404 page. Any idea?


Solution

  • As per my understanding you are trying to have %postname% for the wp pages and posts and %product_cat%/product name for the woo commerce product single pages.

    And in case of product permalinks 'Custom Base' will be working if we set a base for it. You can see the below message next to that

    "Enter a custom base to use. A base must be set or WordPress will use default instead."

    So yo have to set a base, which by default is 'shop'. Without the base no other permalink structure will be accepted here.