Adding a class (arrows) to main menu links that have children?
-
30-10-2019 - |
Pergunta
I'm wondering if it is possible to add different classes to second/third/fourth/etc-level items that have children in Appearance > Menus tree?
That's how I call the menu:
<?php $menu_args = array(
'container' => '',
'menu_class' => '',
'menu_id' => 'my-menu',
'walker' => new Description_Walker);
wp_nav_menu($menu_args );
?>
I know every link owns different ID like <li id="menu-item-3230">
, but I want the solution to be dynamic so I won't have to edit code every time I change something. I guess the easiest way will be to attach additional class to these items but how?
Nenhuma solução correta
Licenciado em: CC-BY-SA com atribuição
Não afiliado a wordpress.stackexchange