Add custom html to last sub-menu item
Ok, so it turns out that by default, $depth in the end_lvl() function starts at 0 when it’s a submenu and increments as the depth gets greater. So we need to test if {$depth} is equal to 0 to apply it only to the first set of submenus: function end_lvl( &$output, $depth, $args ) { … Read more