Woocommerce:按属性显示产品过滤
问题描述:
我想使用复选框或链接过滤Woocommerce中的属性。如果我标记复选框或单击链接,我希望获得具有此属性的所有产品。Woocommerce:按属性显示产品过滤
我该怎么做?我应该编辑哪些文件?
编辑:现在我需要做一个查询来获得所有产品的自定义属性'演示'在我的情况。
我这样做:
$args = array ('meta_query' => array(
array('key' => 'meta_value',
'value' => 'demo',
'compare' => 'LIKE',),
),
);
怎么啦?
谢谢!
答
好吧,我终于得到了结果!
我有这样的:
$args = array (
'post_type' => 'product',
'posts_per_page' => 12,
'meta_query' => array(
array(
'value' => 'demo',
'compare' => 'like'
),
),
);
无论如何要帮忙!
也许这是有帮助的:[如何通过自定义属性过滤WooCommerce产品](http://*.com/q/15138113/1456376) – insertusernamehere
这是有帮助的,但是......哪些文件是? 感谢您的回复! –
也有趣:[WooCommerce Products Filter](http://www.woocommerce-filter.com) – insertusernamehere