How To Get The Custom Field From An Archive’s Taxonomy

Looking to get the advanced custom field from an archive’s taxonomy? All you may need is to call your taxonomy name with the ID.

Get the custom field from the current archive's taxonomy

To get the custom field from the current archive’s taxonomy, you should use the code below; replacing it with your taxonomy name.

echo get_field( 'acf_field_name', 'thetaxonomy_' . get_queried_object_id() );

Note, the underscore appended to the taxonomy (thetaxonomy_) is important as it acts as a prefix to the taxonomy’s ID.