Have you tried just hiding them with CSS?
.primary-navigation .primary-menu-container > ul > .menu-item > a + .sub-menu-toggle {
display: none;
}
Or are you looking for a walker function to physically remove the HTML?
Oliver
Further to my last message, this PHP should prevent the buttons from being displayed in the first place …
function remove_twenty_twenty_one_add_sub_menu_toggle() {
remove_filter('walker_nav_menu_start_el', 'twenty_twenty_one_add_sub_menu_toggle');
}
add_action('after_setup_theme', 'remove_twenty_twenty_one_add_sub_menu_toggle');
Let me know if that works.
Oliver
Thanks @domainsupport! I added that function and it removed the button.
I know I could have hidden it with CSS, but I am partial to button’s removal just to avoid extraneous code (albeit a very small amount). Thanks for the help!
Hey @domainsupport, that makes sense and your solution worked. Thanks for looking into that for me.