StoutLogic / acf-builder

An Advanced Custom Field Configuration Builder
GNU General Public License v2.0
794 stars 62 forks source link

How to set field for Custom Taxonomy #128

Closed jsonpreet closed 3 years ago

jsonpreet commented 3 years ago

Hi, i tried to add image picker field for custom taxonomy but it won't show, if i use it for category its working

$flag = new FieldsBuilder('country_flag');

$flag->setLocation('taxonomy', '==', 'countries');

$flag->addImage('image');

add_action('acf/init', function() use ($flag) {
  acf_add_local_field_group($flag->build());
});
jsonpreet commented 3 years ago

Sorry my bad its working.