I have a taxonomy named country. I used acf to add 2 new custom fields as seen in the picture
But when i try to access those fields, i cannot find them. All i have are
"country": {
"term_id": 1,
"name": "aaaa",
"slug": "aaaa",
"term_group": 0,
"term_taxonomy_id": 1,
"taxonomy": "country",
"description": "",
"parent": 0,
"count": 0,
"filter": "raw"
},
I tried doing this but I don't get the values.
$terms = get_terms( array(
'taxonomy' => 'country',
'hide_empty' => false, ) );
$output = '';
foreach($terms as $term){
//$output .= $term->name . '-';
$output .= get_field( 'flag', 'country'.'_'.$term->term_id );
}
What am i doing wrong? Thank You