Home Forums ACF PRO Category Custom Field


Category Custom Field

  • Hey guys,

    sorry my english is not so good. I have a problem. I will use a custom field in a category.

    The field name is: category_beschreibung
    The category id is: 29

    How can i show this field in my template?

  • Hi @philnickel

    No problem!

    To show your value from a specific category in a template you use the second parameter of get_field or the_field which is normally used for post IDs.

    For categories you use
    the_field('fieldname', 'taxonomyslug_categoryid')
    For users you’d use
    the_field('fieldname', 'user_'.$user->ID)

    Etc etc

    so in your case it would be
    the_field('category_beschreibung', 'category_29')

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Category Custom Field’ is closed to new replies.