Support

Account

Home Forums Front-end Issues Display taxonomy image in WP_Query Reply To: Display taxonomy image in WP_Query

  • To get the category of the current post you need to do this using wp_get_post_terms() inside of your post loop.

    
    $terms = get_post_terms();
    

    This returns an array that you loop over to get the images for each term, https://www.advancedcustomfields.com/resources/adding-fields-taxonomy-term/

    
    foreach ($terms as $term) {
      $image = get_field('logo_image', $term);
    }