diff --git a/wp-content/themes/twentytwentyone/inc/menu-functions.php b/wp-content/themes/twentytwentyone/inc/menu-functions.php index d8d2aae36c..5c14b96a35 100644 --- a/wp-content/themes/twentytwentyone/inc/menu-functions.php +++ b/wp-content/themes/twentytwentyone/inc/menu-functions.php @@ -25,7 +25,9 @@ * @return string Nav menu item start element. */ function twenty_twenty_one_add_sub_menu_toggle( $output, $item, $depth, $args ) { - if ( 0 === $depth && in_array( 'menu-item-has-children', $item->classes, true ) ) { + if ( 'primary' === $args->theme_location + && 0 === $depth && in_array( 'menu-item-has-children', $item->classes, true ) + ) { // Add toggle button. $output .= '