Support

Account

Home Forums Front-end Issues Display image Reply To: Display image

  • You’re not using the correct id for the field

    
    <?php 
      $args = array(
        'hide_empty' => 0,
        'parent' => 0,
      );
      
      $terms = get_terms( 'taxonomy_ascenseur', $args );
      if (!empty($terms) && !is_wp_error($terms)) {
        echo '<ul>';
        foreach ( $terms as $term ) {
          echo '<li><img src="'.
            the_field('image_categorie', 'taxonomy_ascenseur_'.$term->term_id).
            '"/>'.$term->name.'</li>';
        }
        echo '</ul>';
      }
    ?>
    

    In the future you should not reply to your own question. Doing so takes it off the list of question that need a reply so it looks like someone is already helping you. Bumping questions won’t get them answered faster and doing so will hurt your chances of getting a reply.