Skip to main content

Theme_menu_links: How to target a specific menu in Drupal

Today we needed to override the menu links of one menu on our Drupal 7 site. We started with theme_menu_links(), but quickly decided that we didn't want to figure out what menu every menu link belonged to. After some searching we discovered this comment ( which suggested using this naming structure:


Sure enough, once this function was placed in our theme, the exact menu was targeted and we didn't have to wade through every menu item.