How to add ID attribute to each submenu?
In your Walker_N_Menu class’s start_lvl() method, you’re setting the <ul>‘s id to submenu1. You can change this (using, in this example, the $depth parameter passed to start_lvl()) to be unique: function start_lvl( &$output, $depth = 0, $args = array() ) { // Depth-dependent classes. $indent = ( $depth > 0 ? str_repeat( “\t”, $depth ) … Read more