I want to filter products by attribute in Woocommerce using a checkbox or alternatively a link. If I mark the checkbox or click the link I want get all products that have this attribute.
How can I do this? Which files should I edit?
Edit: Now i need do a query to get all products that have a custom attribute 'demo' in my case.
I'm doing this:
$args = array ( 'meta_query' => array(
array( 'key' => 'meta_value',
'value' => 'demo',
'compare' => 'LIKE', ),
),
);
Whats wrong??
Thanks!
Ok i got finally the result!
I have this:
);
Thanks anyway for the help!