Support

Account

Home Forums General Issues Location for nav_menu_item

Unread

Location for nav_menu_item

  • I am trying to add meta box for nav menu item. But this code doesn’t work.

    acf_add_local_field_group( array(
        'key'      => 'group_1',
        'title'    => 'My Group',
        'fields'   => array(),
        'location' => array(
            array(
                array(
                    'param'    => 'form',
                    'operator' => '==',
                    'value'    => 'nav_menu_item',
                ),
            ),
        ),
    ) );
    
    acf_add_local_field( array(
        'key'    => 'field_1',
        'label'  => 'Sub Title',
        'name'   => 'sub_title',
        'type'   => 'text',
        'parent' => 'group_1'
    ) );
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.