Wordpress

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

11329974_915554731815934_6893660335813259571_n
In brief
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();.

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”.

Leave a Comment