Display taxonomy values
-
Hello,
Could you please help me with php code to display custom taxonomy values.
I mean like there is a custom taxonomy by name “localstore”, values are BLUE and RED. Is there a php code that display these values. I tried this code, it shows but with errors. I use it in woocommerce product description.<?php $terms = get_the_terms( $post->ID, 'localstore' ); if ($terms) { foreach($terms as $term) { echo $term->name; } } ?>Thank you.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘Display taxonomy values’ is closed to new replies.