Memnu walker: how to tell if a sub menu contains submenus?

I mean:

<ul>
<li>
<ul class=”sub-menu”>
<li>
<ul>
<li></li>
<li></li>
<li></li>
</ul>
</li>
<li></li>
<li></li>
</ul>
</li>

<li>
<ul class=”sub-menu”>
<li></li>
<li></li>
<li></li>
</ul>
</li>
<li></li>
</ul>

I need to add an exra class to the first, big submenu. In other words, I need to style the sub-menus that contain more sub-menus in a different way mfrom sub-menusn that only contain final list items.

I can extend the Walker_Nav_Menu class, but after taking a look to it, it seems there’s no way to know when an sub-menu will contain other sub-menu, because there’s no data available about its children.

Apparently.

So what?

Read more here:: Memnu walker: how to tell if a sub menu contains submenus?

Leave a Reply

Your email address will not be published. Required fields are marked *