Support

Account

Home Forums ACF PRO How do you setup a Category Taxonomy in a function within Functions.php ? Reply To: How do you setup a Category Taxonomy in a function within Functions.php ?

  • Hi @matt-seligman

    You need to pass the ID of the category where the image is located. If you add the image to a category with the ID of 1, for example, you need to use this code:

    $cat_id = '1';
    the_field('image', 'category_' . $cat_id);

    Or:

    the_field('image', 'category_1');

    This page should give you more idea about it: http://www.advancedcustomfields.com/resources/get-values-from-a-taxonomy-term/.

    I hope this helps.