Wow. How could I miss that one?
Huge thanks, james. That worked.
Argh… figured it out. My bad.
Huge, huge thanks, John!
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!
Would you mind showing me how this last code would look like if the output of that image field HAD to be the image ID?
I´m trying to get it to work on a CPT’s single.php and show the custom taxonomy term’s image this post is associated with.
Any hint would be appreciated!
John..thumbs up! 🙂
Had to still try a lot but it worked in the end. Huge huge thanks!
I´m afraid I´m not php savvy enough but will try that.
Thanks a lot!