Support

Account

Home Forums General Issues Display taxonomy term image field in page template Reply To: Display taxonomy term image field in page template

  • old question popped to the top for spam.

    The code to show each term image:

    
    <?php 
    $terms = get_terms(array('taxonomy' => 'service', 'hide_empty' => false));
    foreach ($terms as $term) {
      $term_image = get_field( 'tax_image', $term);
      if ($term_image) {
        ?>
          <img src="<?php echo $term_image['url']; ?>" alt="<?php echo $term->name; ?>">
        <?php 
      }
    }
    ?>