Detecting classes, adding widgets, and adding divs in with a Nav Walker
You can check the depth using the $depth parameter to see if you are at the section level, and only add the <section> based on that parameter. function start_lvl(&$output, $depth = 0, $args = array()) { $indent = str_repeat(“\t”, $depth); $output .= “\n$indent”; if ( 2 == $depth ) { $output .= “<section>”; } $output … Read more