I’m trying to pull in all menus that the user has created in a select field. Can anyone tell me why this isn’t working? Thanks in advance!
piklist('field', array(
'type' => 'select'
,'field' => 'submenu_selection'
,'value' => 'option1' // Sets default to Option 2
,'label' => 'Sub Menu'
,'description' => 'This is where to select what sub menu you need.'
,'attributes' => array(
'class' => 'text'
)
,'choices' => array(
piklist( return get_terms( 'nav_menu', array( 'hide_empty' => true ) ) );
)
));