Home › Forums › Pro Support › Custom Fields › Reply To: Custom Fields
February 4, 2020 at 5:13 pm
#13175
Keymaster
Can you show me exactly what this code outputs?:
$terms = get_terms( ( array('taxonomy' => 'dormitorio', 'hide_empty' => false,)));
if ( isset( $terms ) && '' !== $terms ) {
foreach( $terms as $term ) {
echo '<div class="tax dormitorio ' . $term->slug . '">';
echo $term->name;
echo '</div>';
}
}
It should output every single term by name attached to the current post.
If it does, we should be able to add a class name to the surrounding div with a class specific to the name.