I have the following html on my menu section:
<nav class="navigation"> <ul> <li class="active-menu">Home</li> <li>About <ul class="submenu> <li class="sub-item">Our History</li> <li class="sub-item">Our Goal</li> </ul> </li> <li>Contact</li> </ul> </nav>
Now I am planning to add 2 things here: one is the
active-menu class if the item click is the active one and then add classes namely
sub-item to the submenu that were set at the WordPress Menu Dasbhoard.
So far I have the following code:
<?php wp_nav_menu(array( 'theme_location' => 'headerMenuLocation' )); ?>
How do I customize my
wp_nav_menu in order to add these classes?
Thank you in advance.