I'm quite new to WP theme development so I'm sorry if the answer for this question may seem obvious.
I'm developing a custom WordPress theme from scratch, and I'm stuck working on the menus. My header menu has some submenus that I'd like to style, but when I call the menu with the wp_nav_menu() function, the HTML output doesn't recognize them as submenus.
I mean, even if I built correctly the menus in the admin panel, the output I get is:
<ul> <li>Item #1</li> <li>Item #2</li> <li>Item #3</li> <li>Item #4</li> <li>Item #5</li> <li>Item #6</li> </ul>
Item #4 and Item #5 are nested into a submenu under Item #3, for example, and I want them to be nested inside another ul, how they should be. I'm sure it's a theme related problem, because everything works well by switching to a default theme.
This is how I use the wp_nav_menu() function:
wp_nav_menu( array( 'theme_location' => 'header-menu', 'container_class' => 'navigator' ) )
Maybe I have to add something in functions.php, but I really don't know what.
Thank you all.