I am trying to get the secondary menu to display in the inside_mobile_header hook. I want the secondary menu to display in the header so that it can be sticky on top along with the header.
Example: https://imgur.com/a/y5CFS3c
The yellow bar would be the secondary menu.
I got this:
<div class="mobile-header-food-menu">
<?php
if (function_exists('has_nav_menu') && has_nav_menu('secondary')) {
}
?>
</div>
That conditional evaluates to true. So all I need is the line of php that brings up the secondary menu. I have tried this:
$nav_menu = array( 'title_li' => '', 'theme_location' => 'secondary' );
wp_nav_menu($nav_menu);
I also tried submenu instead of secondary, both don’t bring up anything.
How can I do this?
Another solution would be to have the secondary navigation stick to the bottom of the header with css I guess, but I would prefer the first method.