ACF field from category
-
Hi! This is what I’m using for showing the category name:
<?php $event_id = get_the_ID(); $event_cats = get_the_terms($event_id, 'tribe_events_cat'); $custom_field = get_field( 'custom_field', Tribe__Events__Main::TAXONOMY ); foreach ($event_cats as $category) { echo '<p>' . $category->name . '</p>'; echo '<p>' . $custom_field . '</p>'; } ?>
I also have ACF field input for the categories. Tried many different options to get the custom field from the category, but still do not get how to call it.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘ACF field from category’ is closed to new replies.