Menu
Renders a specific WordPress menu (chosen by id) inside a header bar or footer column. Use this when you want to place a particular menu directly, rather than a theme location.
Where the code lives
| Type key | menu |
| Fields | menu_id (select of Appearance → Menus) |
| Rendered by | unysonplus_render_menu() in inc/includes/header-builder.php (via unysonplus_nav_menu()) |
How it works
The renderer reads menu_id and hands it to the theme's nav renderer, which outputs the menu's
<nav> / <ul> markup (with the theme's dropdown / mega / accordion submenu behavior). It's wrapped
in the shared .header-element wrapper.
Example 1 — basic
Settings: Menu → Main Menu (id 12).
array(
'element_type' => array( 'element' => 'menu', 'menu' => array( 'menu_id' => '12' ) ),
'visibility' => array(),
'element_css_class' => '',
)
<div class="header-element header-element--menu">
<nav class="up-nav">
<ul class="menu">…the "Main Menu" items…</ul>
</nav>
</div>
Example 2 — with Hide On + CSS Class
Hide On: phones (common — the menu moves into the off-canvas drawer there), CSS Class:
primary-nav.
array(
'element_type' => array( 'element' => 'menu', 'menu' => array( 'menu_id' => '12' ) ),
'visibility' => array( 'hide-xs' ),
'element_css_class' => 'primary-nav',
)
<div class="header-element header-element--menu hide-xs primary-nav">
<nav class="up-nav"><ul class="menu">…</ul></nav>
</div>