WP Advanced Search: Default value for taxonomy field

I’m using a WP Advanced Search to search for custom posts. It contains 4 fields, one to search the post’s title, two other to limit search results to specific meta data, and another one to limit results to a specific custom taxonomy:

[...]
$args['fields'][] = array('type' => 'taxonomy',
'label' => __('Discipline:', CORE_THEME_NAME),
'taxonomy' => 'course-discipline',
'format' => 'select',
'class' => 'searchselect',
'operator' => 'IN');
[...]

What I want to do now, is to add an empty default selection option for the taxonomy at the top. Does anyone know how to do that in the most simple way?

Related posts

1 comment

  1. Exemplo!

    $args['fields'][] = array(
        'allow_null' => 'Mês',
        'type' => 'date',
        'date_type' => 'month',
        'format' => 'select',
    );
    

Comments are closed.