【发布时间】:2019-04-07 04:20:23
【问题描述】:
我正在尝试根据属性找出在我的商店页面上显示产品所需的 URL。该属性称为“Mantel Type”(slug mantel-type),术语为“Mantel With Overmantel”(slug mantel -with-overmantel)。该术语的 ID 为 106。我尝试了以下 URL,但显示的是所有产品,而不是预期的 22,或者我收到 404 错误。
mysite.com/shop/?attribute_mantel-type=Mantel+With+Overmantel
mysite.com/shop/?attribute_mantel-type=mantel-with-overmantel
mysite.com/shop/?taxonomy=pa_mantel-type?&tag_ID=106
mysite.com/shop/?filter_mantel-type=106
mysite.com/shop/?filter_mantel-type=Mantel+With+Overmantel
mysite.com/shop/?filter_mantel-type=mantel-with-overmantel
mysite.com/shop/?pa_mantel-type=Mantel+With+Overmantel(404 错误)
mysite.com/shop/?pa_mantel-type=106(404 错误)
我已确保已在 Mantel Type 属性编辑器中选中了启用存档复选框。
我在产品类别方面取得了成功,但不是属性。此产品类别链接有效,例如:
mysite.com/shop/?product_cat=french
如何在 URL 中也包含属性?感谢您的宝贵时间。
【问题讨论】:
标签: wordpress woocommerce attributes