My plugin includes advanced select boxes for two taxonomies, each of which is configured to enable the 'add_new' function. However, the 'Add New' button only appears for one of the two. The function works properly when I use it via builder, but when I transfer it to php code, it starts erroring.
The code:
array (
'id' => $prefix . 'author',
'type' => 'taxonomy',
'name' => esc_html__( 'Author', 'pub-fields' ),
'placeholder' => esc_html__( 'Select an author', 'pub-fields' ),
'taxonomy' => 'author',
'field_type' => 'select_advanced',
'multiple' => true,
'columns' => 6,
'add_new' => true,
),
array (
'id' => $prefix . 'org',
'type' => 'taxonomy',
'name' => esc_html__( 'Publication Organisation', 'pub-fields' ),
'placeholder' => esc_html__( 'Select an organisation', 'pub-fields' ),
'taxonomy' => 'organisation',
'field_type' => 'select_advanced',
'multiple' => true,
'columns' => 6,
'add_new' => true,
),
Image of the result: