term_args

Type: array

The ‘term_args’ parameter accepts the same arguments as the native WordPress function get_terms(). It can be used to customize which terms are included in a taxonomy field as well as how they are displayed.

Example: A taxonomy field for post categories, with terms ordered by name in ascending order. Also will display only categories with posts assigned to them (‘hide_empty’ => true).

$args['fields'][] = array('type' => 'taxonomy',
                          'taxonomy' => 'category',
                          'format' => 'checkbox',
                          'term_args' => array('hide_empty' => true, 
                                               'orderby' => 'name', 
                                               'order' => 'ASC')
                          );

Fields that use this parameter