use has_term for product attribute


I’m using Conditional tags to display specific widget on specific product :
for example :

has_term(‘book’, ‘product_tag’)
has_term( array( ‘hyundai’, ‘kia’ ) , ‘pwb-brand’)

now i want use product attribute for conditional tags , for example display widget on products that has "color" attribute with "red" value :
something like this :

hast_term(‘red’ , ‘color’)

how can i do this ?
Thanks in advance

Milad Jafari 2 months 0 Answers 11 views 0

Leave an answer