Home Forums General Issues Featured image for custom taxonomy Reply To: Featured image for custom taxonomy

  • This document covers getting values from a term

    You are doing that incorrectly

    $image_id = get_field(‘_thumbnail_id_marque’, ‘term_’ . $term_id);

    you can also call this function with the term object instead of "term_{$term_id}"

    This document covers using an image field

    How you use it depends on what you have set as a return value for the image field. But you can always get only the ID value regardless of the return setting by setting the 3rd parameter to false

    $image_id = get_field(‘_thumbnail_id_marque’, ‘term_’ . $term_id, false);