We're merging with GenerateBlocks! Learn more here.

Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Custom Fields Reply To: Custom Fields


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.