How do I get the ACF field value from the category?
For a category:
<?php
$post_id = "category_3"; // category term ID = 3
$value = get_field( 'my_field', $post_id );
?>
For a custom taxonomy "event":
<?php
$post_id = "event_4"; // event (custom taxonomy) term ID = 4
$value = get_field( 'my_field', $post_id );
?>
Samples taken as is from acf get_field()
docs:
ACF get_field() documentation
All the samples:
<?php
$post_id = false; // current post
$post_id = 1; // post ID = 1
$post_id = "user_2"; // user ID = 2
$post_id = "category_3"; // category term ID = 3
$post_id = "event_4"; // event (custom taxonomy) term ID = 4
$post_id = "option"; // options page
$post_id = "options"; // same as above
$value = get_field( 'my_field', $post_id );
?>