I have added an image field to my taxonomy terms and now I want to display the taxonomy image on my home page. On my home page it lists the recent 10 post titles. I want each of my post title to show the taxonomy image that the post is in. How can I do this?
Hi @ruriko,
Thanks for the post.
To display the values from a Taxonomy term, you will need to add a string containing the the term’s taxonomy and ID in the following format; “{$term->taxonomy}_{$term->term_id}” as a second parameter to the get_field() function in order to target the term.
Instead of this, a term object can also be passed like so:
<p><?php the_field('field_name', $term); ?></p>