From the help of the comments above I needed to use get_term_terms to print the ID.
I used the code below to achieve what I needed:
<?php
$terms = get_the_terms( $post->ID, 'producers_assessment' );
foreach($terms as $term) {?>
<?php
$image = get_field('badge', 'producers_assessment_' . $term->term_id);
if( !empty($image) ): ?>
<img src="https://wordpress.stackexchange.com/questions/295839/<?php echo $image["url']; ?>" alt="https://wordpress.stackexchange.com/questions/295839/<?php echo $image["alt']; ?>" width="50" height="50" />
<?php endif; ?>
<?php } ?>
Related Posts:
- Order get_terms using a Custom Field
- Get value in custom field with taxonomy [closed]
- Advanced custom fields – taxonomy terms images [closed]
- Operations with custom fields values in a loop
- How to add contents of a custom field to a taxonomy term list?
- Show related posts on single.php, grouped by taxonomy terms, with Advanced Custom Field post object selected
- Get the the top-level parent of a custom taxonomy term
- get_terms – only top level
- How to only list the child terms of a taxonomy and not their parents?
- Hierarchical taxonomy UI
- Hide the term description on the term edit page, for a given taxonomy
- get_term_by not working when in functions.php
- Get only the first term by taxonomy
- get_terms() returns an empty array
- Custom Taxonomy Only Showing Top Level Terms in Admin?
- Is it possible to get a Previous/Next Taxonomy term archive URL?
- WP_insert_term how to insert multiple values as taxonomny term?
- Custom Taxonomy Images with Advanced Custom Fields
- Custom taxonomy term as class?
- How to edit/remove a term that’s in multiple taxonomies?
- How to display term description in empty terms archive?
- get_terms custom order
- how to create a proper query for getting a list of users with taxonomy related meta key
- How to List Parent Term Links for Custom Taxonomy With & Without Children?
- Generic taxonomy-term template page
- Get direct children of custom taxonomy
- List subcategory on taxonomy term page
- How to insert an array of terms using wp_insert_term?
- Get child product categories from parent product category in WooCommerce
- display taxonomy slug from term ID
- How to use get_the_terms() to display multiple terms?
- Display the description of taxonomy terms
- get_terms adds slaces to the resualt
- List posts of term on term’s admin edit page
- Can I use a Custom Meta Value inside of ‘get_the_terms’?
- one term two taxonomy’s?
- Display only child terms of a specific parent term of a custom taxonomy, for each custom post
- Getting WooCommerce product related child categories
- Same term from custom taxonomy in two different custom post types?
- How to fetch the data from Advanced Custom post when we search specific keyword or field name related to the post?
- Can’t set custom taxonomy terms via custom form
- Some custom taxonomy child terms not showing in admin. Caching problem?
- get_terms not returning any custom taxonomies
- WordPress implode & wp_insert_post question
- Order get_terms() by hierarchy
- What does ‘category__in’ mean in queries?
- Displaying Custom Taxonomy without a hyperlink
- Get all terms, including unchecked, or get the terms outside loop
- get_term_link not working
- How to write sql query to get the posts from a custom taxonomy term name
- Get only immediate children (and not grandchildren) of a hierarchical custom taxonomy term
- How to support fifteen thousand terms in WordPress?
- How to group all terms children’s in custom taxonomy?
- Display Posts by Custom Taxonomy Chosen Terms
- Show template part if part of term
- How to display a custom taxonomy without a link?
- Build filter for post-type + multi taxonomies + multi terms
- How do I get term data associated with the current post, where the result is not wrapped in HTML?
- Hide terms if they aren’t the same as the current term
- Corrupted nav-menu?
- The best way to display taxonomies
- Dynamically set taxonomy term and show admin notice on post save
- WP 4.8 : new taxonomy syntax for get_term_by and get_term_link ?
- Terms change id after importing
- List Top 5 taxonomy terms based on number of post
- Can you hide empty terms using get_term_children?
- How to add custom taxonomy terms to posts in bulk
- How to add a date creation field when a custom taxonomy relationship is created?
- List terms of custom taxonomy if matches other taxonomy
- why the archive of custom taxonomy term shows nothing?
- Use wp_list_categories to list parent categories from actual term
- Include get_term_link inside search
- Trash Bin for Categories?
- is there a way of getting term children that only shows those from two taxonomies
- How to add a shortcode function that returns the taxonomy slug of the actual post within the loop
- How to list custom taxonomy terms alphabetically by last word
- Tree view wp-admin terms
- Retrieve the child terms by having the parent’s information
- Order get_terms by count using a custom taxonomy hierarchy
- Add A CSS Class To A Menu Item When A Custom Taxonomy Term is Present On Single Post
- Adding Advanced Custom Fields to posts
- Add term to taxonomy programatically
- setting a custom post type taxonomy term by code
- Why get_terms() behaves strangely when being called in admin (for use in meta box)?
- How do I check to see if a specific child term has shared posts with another set of child terms within the same taxonomy?
- Output slugs to use as class names for every taxonomy a post is attached to
- Group & Sort Taxonomy terms by letter – Is there a better way?
- qtranslate-x problem with custom term description
- Orderby taxonomy term id using get_posts not working
- Sorting terms individually for each post
- Trying to Display Number of Posts in Term
- Order posts with custom taxonomy array
- Determine if Term has Grandparent/Great-Grandparent
- Exclude 2 in 3 terms of A Taxonomy from all Archives
- add_query_arg to look up page title
- Altering term_id and name via $wpdb class
- Create heirachy of post terms from array & assign post to terms
- How to delete unused terms?
- How to filter the terms of custom taxonomy by author id in admin panel
- ACF – How to get custom taxonomy term image field