title: How to add multiple menus in Wordpress theme?
body: <p>I am developing a new Wordpress theme, and I need two menus, the main menu, and the footer menu. This is what I have in functions.php:</p>
  
  <pre><code>if ( function_exists('register_nav_menus')) {
      register_nav_menus(
          array(
              'main' =&gt; 'Main Menu',
              'footermenu' =&gt; 'Footer Menu'
          )
      );
  }
  </code></pre>
  
  <p>And, I am calling two menus, one in header.php and other in footer.php:</p>
  
  <pre><code>&lt;?php $main_menu = array('menu' =&gt; 'main', 'container' =&gt; 'nav' ); wp_nav_menu( $main_menu ); ?&gt;
  
  &lt;?php $footer_menu = array('menu' =&gt; 'footermenu', 'container' =&gt; 'nav' ); wp_nav_menu( $footer_menu ); ?&gt;
  </code></pre>
  
  <p>I am also assigning both menus a different menu in Wordpress Menus Manager, but in both menus, only the menu I assign to the first one is shown. I don't know why. Can anybody help me solve this?</p>
  
  <p>Thanks.</p>