I'm working on something on wordpress + woocommerce. I've inputed some 'filter' attributes value for some products.
So if the value of the attribute for this product includes a "Wood Grains" value, i want to echo an Woodgrains.jpg on the front end.
Therefore if the value = Texture, i want to echo Texture.jpg icon.
the code below is what i've mustered so far, but this only echoes out all the values tagged to a product, i can't figure out what to change to get the 'if' statement in it.
$terms = get_the_terms( $product->id, 'pa_filter'); foreach ( $terms as $term ) { echo $term->name; } here's a screenshot of what the code above does on the front end: http://edleuro.com/new/wp-content/themes/mystile/img/1.png