relation

Type: string
Possible values: 'AND', 'OR'

The relation parameter can be used when configuring meta_key or taxonomy fields that have more than one input.

Example

The following is an example of a taxonomy field for categories using two multi-select inputs. Setting relation to ‘AND’ means that results must match ALL categories selected in the first input, AND must not match ANY categories selected in the second input.

        $args['fields'][] = array(
            'type' => 'taxonomy',
            'taxonomy' => 'category',
            'relation' => 'AND',
            'inputs' => array(
                array(
                    'label' => 'Matches all:',
                    'format' => 'multi-select',
                    'operator' => 'AND'
                ),
                array(
                    'label' => 'Matches none:',
                    'format' => 'multi-select',
                    'operator' => 'NOT IN'
                )
            )

        );