Get Custom Taxonomy Image field with Advanced Custom Field Plugin in WordPress

Using the Advanced Custom Field Plugin we can add Custom image field to any taxonomy (default category or any custom made one). To get the value of that custom field we can use the function
get_field();

Eg : to get value from a taxonomy named “category” and its id is “3” use

$value = get_field('field_name', 'category_3');

for the function the 1st parameter is the custom field name and 2nd parameter is the category string in the format “$type_$id”.

Sharing is caring!

Related Posts

Leave a Comment

shares