I Am Developing A Custom Theme. I have registered nav menus as you can see below
register_nav_menus( [ 'hub_header_menu' => __('Header Menu', 'HUB_WP'), 'hub_footer_menu' => __('Footer Menu', 'HUB_WP'), ] );
Code Of Printing Menus
<div class="header-desktop"> <?php wp_nav_menu([ 'theme_location' => 'hub_header_menu', ]); ?> </div>
I have Some Menu Items With Submenu But the problem is that the ".sub-menu" class is missing in submenus and they are printing as simple menu item.Like Code In Code Below, the "Sample" Page Is Sub item of "Home" but it is printed as simple menu items instead of submenu item.
I want to get .sub-menu class to style it. If I remove theme_location than it works properly but whenever i put theme location, it starts causing problem.