melting_dog Posted January 7, 2012 Share Posted January 7, 2012 Hi all, I am trying to add a series of custom menus to my Wordpress theme but they all return the same menu. I have this in my functions.php add_action('init', 'register_custom_menu'); function register_custom_menu() { register_nav_menu('custom_menu', __('Custom Menu')); register_nav_menu('specials_menu', __('Specials Menu')); } and this in the nav section of my header: <?php wp_nav_menu(array('menu' => 'specials_menu')); ?> <?php wp_nav_menu(array('menu' => 'custom_menu')); ?> Can anyone tell me where I've gone wrong? I thought this was the way it was meant to work Quote Link to comment Share on other sites More sharing options...
melting_dog Posted January 7, 2012 Author Share Posted January 7, 2012 OK I think I have found the solution: Replace the word 'menu' in <?php wp_nav_menu(array('menu' => 'specials_menu')); ?> to 'theme_location' e.g: <?php wp_nav_menu(array('theme_location' => 'specials_menu')); ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.