Home › Forums › Front-end Issues › Display value for taxonomy term text in categories › Reply To: Display value for taxonomy term text in categories
Hi @wecandoit
The code depends on where you assign the custom fields.
Based on your previous code, the code should have this structure:
<?php echo get_field('petite_description_cat', '$taxonomy_$termID');?>
You can get the $taxonomy and $termID value by checking the URL when editing the term. I’ve attached a screenshot for your reference.
As you can see in the screenshot, there are taxonomy=category
and tag_ID=10
. So if you assign the custom field to a category with ID of “10”, then you need to do it like this:
<?php echo get_field('petite_description_cat', 'category_10');?>
If you don’t know how to code and don’t have time to learn it, I suggest you hire a developer to help you out.
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.