Home › Forums › General Issues › Get Custom Taxonomy in Select Taxonomy Field Type with its Image
Okay, so i have custom taxonomy and added custom image field using ACF.
My question is, how can i get the name and image of the custom taxonomy using php function in the backend when i using the field groups?
There is not enough information in your question. Where exactly to you want to get this? What do you want to do with it? Name = name of the term or name of the image?
Sorry, previously I created a custom post type named “article” and a custom taxonomy (category) named “article layout” with a custom image field as the image for the layout created using ACF pro.
Then, i created a custom field for the “article” custom post type, the field is a “taxonomy field” with select from the “article layout” custom taxonomy and save the single select as the category taxonomy.
When i create or add a new article custom post, the custom taxonomy display the custom “article layout” name.
My question is, how can i populate or add the custom image field in the “article layout” to the selection (instead only the name).
I hope its understandable, and thank you for the reply.
https://www.advancedcustomfields.com/resources/acf-fields-taxonomy-result/
You can return an image tag in $text
A little more into
In the filter
$image = get_field('image-field-name', $term);
and create the image tag following the image field doc
Cool, thank you very much, my bad for not checking for the documentation and resource.
Thanks, once again for your help Mr. John.
You must be logged in to reply to this topic.
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.