Roots creates residual styling and removes critical classes from the menu. We can fix these issues in a child theme.

1. Stop Roots from removing Core WordPress menu item classes

Roots does a lot of non-standard things to alter the normal WordPress installation, and this can be problematic for plugins. One main issue this theme presents is that it strips core WordPress Menu Item classes that are necessary for UberMenu to style the menu properly. Here is the code from Roots’ lib/nav.php line 55.

As a result, all of the critical, core menu item classes like menu-item are removed, and UberMenu’s styles cannot apply to your menu. Themes shouldn’t remove core functionality from WordPress, as WordPress is a modular system that needs to share core functionality across themes and plugins.

We can add this code to a child theme to stop the removal of these important classes:

Instead of wrapping wp_nav_menu() in a hard-coded nav element, Roots should be making use of the wp_nav_menu arguments that can set the container to a nav and pass the appropriate classes. Instead, we’ll need to edit this – you can either just remove all the classes from the nav element