Home › Forums › Front-end Issues › Displaying Fields from Post Category or Subcategory › Reply To: Displaying Fields from Post Category or Subcategory
Thanks for your quick reply. There’s probably something I’m not understanding about $term_id. I have a regular WP post category of “stories-by-state” which has subcategories of each state (alabama, alaska, etc.). I don’t think the fact that I’m retrieving subcategory info has any effect on the outcome.
Given your instruction, I would have something like the folowing:
the_field('test_field', 'alabama_' . $term_id);
or
the_field('test_field', 'alabama_16');
where 16 is the the number I get from the ur:l /wp-admin/edit-tags.php?action=edit&taxonomy=category&tag_ID=16&post_type=post
Neither worked and I”m not 100% sure how to pull $term_id.
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.