Support

Account

Home Forums General Issues Adding fields in taxonomies via php Reply To: Adding fields in taxonomies via php

  • You need to alter the location rules of the field group, this part

    
    'location' => array (
          array (
    					array (
    							'param' => 'post_type',
    							'operator' => '==',
    							'value' => 'post',
    							'order_no' => 0,
    							'group_no' => 0,
    				),
    		),
    ),
    

    The best advice I can give you is to set up a field group in the admin, set the location rules correctly and then export that field group to get an example of what the location rules need to be set to.

    Additional problems, all groups must have a group key that starts with “group_” and I didn’t look at every one of your fields but field must have a field key that starts with “field_”.

    Group “ID” is irrelevant when registering field groups through PHP.