I'm attempting to return every term of a specific taxonomy. I just need to add terms to an object which I can loop through. I've been working on this for while but don't seem to be able to get anywhere.
So for example I have the Taxonomy 'Brand', I have several terms within this taxonomy. How can I return every term under this taxonomy.
Thanks
I have tried the following:
global $product
$test_value = get_the_terms( $product->id, 'pa-brands');
foreach($test_value as $test_values){
echo $test_values->name;
}
Only this shows an error int the log: 'Unexpected T_Variable'
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire