<?php wp_nav_menu( array(
'theme_location' => 'primary_menu',
'container' => '',
'items_wrap' => '%3$s',
'list_item_class' => 'header_nav-item',
'link_class' => 'nav-link',
)
);
?>
<li class="header_nav-item">
<a href="/" class="nav-link">
<span class="nav-title">Services</span>
</a>
<div class="hover-submenu">
<a href="" class="submenu-link">W</a>
<a href="" class="submenu-link">M</a>
<a href="" class="submenu-link">B</a>
<a href="" class="submenu-link">U</a>
<a href="" class="submenu-link">E</a>
<a href="" class="submenu-link">I</a>
</div>
</li>
<li class="header_nav-item">
<a href="works.html" class="nav-link">
<span class="nav-title">Works</span>
</a>
</li>
<li class="header_nav-item">
<a href="company.html" class="nav-link">
<span class="nav-title">Company</span>
</a>
</li>
</ul>
wp_get_nav_menu_object()
и вывести произвольным циклом. Получить можно по названию:$menu_name = 'Menu';
$nav_menu = wp_get_nav_menu_object( $menu_name );
if ( !$nav_menu ) {
$menu_id = wp_create_nav_menu( $menu_name );
} else {
$menu_id = $nav_menu->term_id;
}
// получаем элементы меню
$nav_menu_items = wp_get_nav_menu_items( $menu_id );
$menu_location = 'primary';
$locations = get_nav_menu_locations();
if ( isset( $locations[$menu_location] ) ) {
$nav_menu_items = wp_get_nav_menu_items( $locations[$menu_location] );
}