Adding a unique class to wp_nav_menu
Check out the section titled Adding Conditional Classes to Menu Items on the wp_nav_menu Codex page. This should give you a pretty good overview for adding classes to menu items using the nav_menu_css_class filter. For what you asked to do, which is add menu_element to the class attribute for both the menu item with ID … Read more