Home › Forums › General Issues › Image Custom Field from CPT converted to Taxonomy › Reply To: Image Custom Field from CPT converted to Taxonomy
Hi @mcseay
CPT-onomies has a weird structure as it forces a post as a taxonomy. To get the custom field, you need to pass the id of this post (the post that is converted to a taxonomy) as the second parameter. Something like this:
<?php $image = get_field('headshot', $cptonomies_post_id); ?>
where $cptonomies_post_id is the id of the post.
I hope this makes sense.
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.