Display a Custom Menu in a Drupal 7 Theme Template File
Warning: This post is over a year old. I don't always update old posts with new information, so some of this information may be out of date.
For reference, this is the code needed to display a menu in a Drupal 7 template file, including the navigation ARIA role.
$menu_name = 'menu-footer-menu'; $menu_id = 'footer-menu'; print theme('links', array( 'links' => menu_navigation_links($menu_name), 'attributes' => array( 'id' => $menu_id, 'role' => 'navigation', 'class'=> array('links', 'inline') ) ));
About the Author
Oliver Davies is a Full Stack Web Developer and System Administrator based in the UK. He is a Senior Software Engineer at Inviqa and a part-time freelancer specialising in Drupal, Symfony and Laravel development and Linux systems administration.