Support

Account

Forum Replies Created

  • Hi Guys. Finally I found the solution!!!!
    I leave for you the solution that I found:

    <?php 
    if( have_rows('repeater_field_name') ): 
    while( have_rows('repeater_field_name') ): the_row(); 
    $tax_val = get_sub_field('taxonomy_sub_field_name');
    $taxonomy = 'custom_taxonomy_name';
    $term_name = get_term($tax_val, $taxonomy);
    if( $tax_val ): echo $term_name->name; 
    endif; 
    endwhile; 
    endif; 
    ?>
  • Hi Rociopts. thank you very much. I could solve it I leave the code for other people who can not find a solution.

    <div class="lista-taxonomia"> 
    <?php $types = get_terms( array( 'taxonomy' => 'nombre-de-la-taxonomia', 'hide_empty' => true, ) );
    foreach($types as $type) { ?>
    <div class="otra-div">
    <?php $image = get_field('nombre-del-campo-de-imagen', 'nombre-de-la-taxonomia_' . $type->term_id . '' ); 
    if ( has_term( $type->term_id, 'nombre-de-la-taxonomia')) {
    echo '<img class="imagenes" src="' . $image['url'] . '" /> ' . '<p>'. $type->name . '</p>'; 
    } ?> </div> <?php } ?>
    </div>
Viewing 2 posts - 1 through 2 (of 2 total)