Home › Forums › General Issues › Taxonomy Term Image › Reply To: Taxonomy Term Image
instead of using <img src="<?php the_field('brand_logo', $term); ?>" />
you would need to do something like
$image_id = get_field('brand_logo', $term, false); // 3rd arg set to false to ensure we get unformatted value (ID)
// $size is a defined image size
// see https://developer.wordpress.org/reference/functions/wp_get_attachment_image_src/
$image = wp_get_attachment_image_src($image_id, $size);
?>
<img src="<?php echo $image[0]; ?>" />
<?php
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.