Support

Account

Home Forums General Issues Taxonomy Term Image Reply To: Taxonomy Term Image

  • Hej John,

    thanks!
    For some reason, the code I “merged” displays the image two times. My code looks like this (yes, I´m not php savy at all ):

    <?php
    $terms = get_the_terms( get_the_ID(), ‘brand’ );
    if( ! empty( $terms ) ) : ?>
    <?php foreach( $terms as $term ) : ?>
    <?php
    $image_id = get_field(‘brand_logo’, $term, false);
    $image = wp_get_attachment_image_src($image_id, $size);
    ?>
    ” />
    <?php endforeach; ?>
    <?php endif;
    ?>

    any idea?

    thanks!