Custom Fields
Re-Envisioned
Support General Add New Items to Taxonomy creates inconsistent results

  • Creator
    Topic
  • #20910
    Resolved info@yoursolutions.today
    Participant

    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:
    Image of the result

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.