Support

Account

Home Forums Front-end Issues Cannot get Taxonomy field values

Unread

Cannot get Taxonomy field values

  • Hi all,

    I have created a taxonomy field and I assigned fields (image/text) to particular taxonomy. Then I tried to retrieve the into the front but no worth so far. I need to show them in Front Page.

    I followed this reference https://www.advancedcustomfields.com/resources/adding-fields-taxonomy-term/ but no worth so far.

    I tried using following code just after the get_terms

    // get the current taxonomy term
    $term = get_queried_object();

    // vars
    $icon_image = get_field(‘icon_image’, $term);
    $icon_class = get_field(‘icon_class’, $term);

    Thanks in advance
    PANA

Viewing 1 post (of 1 total)

The topic ‘Cannot get Taxonomy field values’ is closed to new replies.