How to show products attributes in loop?
-
I added custom attributes to my products, and I would like to show one of these on the product loop page(loop/price.php). The attribue name is: “garan”.
$garanvalues = get_the_terms( $product->id, ‘pa_garan’);
foreach ( $garanvalues as $garanvalue ) { echo $garanvalue->name; var_dump($garanvalue); }
I used the code above, but the var_dump output the following:
array(1) { ["invalid_taxonomy"]=> array(1) ..
I hope you know solution. Thank you very much!
- The topic ‘How to show products attributes in loop?’ is closed to new replies.