WooCommerce 产品永久链接不起作用
WooCommerce product permalink not working
我正在使用 WooCommerce 插件。我已将产品永久链接(设置 -> 永久链接)添加到自定义基础(/商店/%product_cat%),它工作正常。但是,如果我将其更新为 (/%product_cat%) 产品页面工作正常,但网站页面和帖子链接到 404 页面。有什么想法吗?
据我了解,您正在尝试为 wp 页面和帖子使用 %postname%,为 woo commerce 产品单页使用 %product_cat%/产品名称。
并且在产品永久链接的情况下,如果我们为其设置基础,'Custom Base' 将起作用。您可以在旁边看到以下消息
"Enter a custom base to use. A base must be set or WordPress will use default instead."
所以你必须设置一个基数,默认情况下是 'shop'。如果没有基础,这里将不会接受其他永久链接结构。
我正在使用 WooCommerce 插件。我已将产品永久链接(设置 -> 永久链接)添加到自定义基础(/商店/%product_cat%),它工作正常。但是,如果我将其更新为 (/%product_cat%) 产品页面工作正常,但网站页面和帖子链接到 404 页面。有什么想法吗?
据我了解,您正在尝试为 wp 页面和帖子使用 %postname%,为 woo commerce 产品单页使用 %product_cat%/产品名称。
并且在产品永久链接的情况下,如果我们为其设置基础,'Custom Base' 将起作用。您可以在旁边看到以下消息
"Enter a custom base to use. A base must be set or WordPress will use default instead."
所以你必须设置一个基数,默认情况下是 'shop'。如果没有基础,这里将不会接受其他永久链接结构。