Support

Account

Home Forums General Issues How to show category information on single post Reply To: How to show category information on single post

  • You need to specify the id value that ACF needs to get the field https://www.advancedcustomfields.com/resources/adding-fields-taxonomy-term/

    
    <?php 
      $categories= get_the_category();
      if (!empty($categories)) {
        $term_id = $categories[0]->term_id;
        $image = get_field('category-image-field', 'term_'.$term_id);
        // what you do from here depends on what the field is returning
      }
    ?>