• Hi,

    I would like to display category name in the frontend.
    I’ve made a field group with:
    – field type: Taxonmy
    – Taxonomy: Category

    I used this in the my single.php:

    [code]
    <?php

    $field_name = "category_where";
    $field = get_field_object($field_name);

    echo '<b>' . $field['label'] . ':</b> ' . $field['value']

    ?>
    [/code]

    What I get is:

    Where: 28

    28 is my category id. In stead of the id I would like to display the category name.

    Can someone help please?

    Thanks in advance!

    https://www.ads-software.com/plugins/advanced-custom-fields/

Viewing 1 replies (of 1 total)
  • Sounds like you are having it return the Term ID for the taxonomy. In the Return Value section select “Term Object”.

Viewing 1 replies (of 1 total)
  • The topic ‘Display category name in frontend’ is closed to new replies.