MenusPRO

Docs Fields Menus

#Field Render

Display a Menu selector as radio, checkbox or select field type.

Field Group

#Field Settings

Setting nameDescription
Allow FormsFilter which menus can be chosen
AppearanceSelect the appearance of this field
Default ValueEnter each default value on a new line
Return ValueReturn the menu object, menu name or menu ID
Allow NullAllow empty value
LayoutChoose the layout
ToggleAllow to toggle all values
Allow Custom
Allow custom value
Save Custom
Save custom value in the field settings
Select multiple valuesAllow multiple values selection
Stylised UIEnable Select2 UI style

#Field Value

#Return Format: Menu Object

$menus = get_field('menus');

/**
 * array(
 *     'term_id'          => 7,
 *     'name'             => 'Menu',
 *     'slug'             => 'menu',
 *     'term_group'       => 0,
 *     'term_taxonomy_id' => 7,
 *     'taxonomy'         => 'nav_menu',
 *     'description'      => '',
 *     'parent'           => 0,
 *     'count'            => 1,
 *     'filter'           => 'raw',
 * )
 */

#Return Format: Menu Name

$menus = get_field('menus');

// menu

#Return Format: Menu ID

$menus = get_field('menus');

// 7

#Unformatted Value

$menus = get_field('menus', false, false);

// menu