Home › Forums › ACF PRO › Custom Taxonomy and ACF › Reply To: Custom Taxonomy and ACF
It should be working, sort of. The loop you are using looks right but some of the other stuff may be wrong.
On the text field, you’re not echoing the value
data-cf="<?php $custom_field = get_field('test', $taxterm ); ?>">
should be
data-cf="<?php echo get_field('test', $taxterm ); ?>">
or
data-cf="<?php the_field('test', $taxterm ); ?>">
The select field on the other hand might be what you have the return value set to. If you are returning the label or alue then it will be correct, but if you’re returning an array then the issue is that you’re trying to implode a nested array, which will not work.
Also, I don’t know what the “cf-data” attribute is. An attribute of an html element will not be shown on the page, unless you are looking at the html output, in which case you can ignore my ignorance 😛
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.