Support

Account

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.