So I have a couple of already created menus on my wordpress installation. What I am planning to do is display navigation menus in a sliding popup. I have tried using wp_nav_menu() but it always shows the first (alphabetically) menu instead of the one I want displayed.
$args = array ( 'menu_id' => $short, 'menu_class' => 'menu', 'fallback_cb' => false ); wp_nav_menu( $args);
$short is getting the menu name from the URL. As far I have understood the wp_nav_menu function I need to add code to the functions.php as well. Is that correct? I feel like in my usecase that's not the best way to solve the problem, as I want to create 25 sliding navs via PHP. If I have to add code to the functions.php as well for each menu I can do the whole task manually. Thank you