I’ve got a quite complex navigation menu that needs some ul classes to display properly. The navigation consists of nested lists. I know how to target each level within css (ul li ul li) dependant on their position. What I really need is to add a class to the uls on the same level. I want to use the default wordpress nav, so no custom menu required.
1st level ul (class=”level1″)
2nd level ul (class=”level2″)
You might ask why! The thing is that this will be a mega menu combined with a flyout. And there will be images on different navigation levels (e.g. first level, second level) based on the hierarchy.
I am currently using it in the project. But there’s one requirement that brings me back to your tutorial link. I need to add the post thumbnail and excerpt of a page to my wp_nav_menu. But only, if there’s no subpage for that item.