I make a menu on the site through wp_nav_menu. WordPress site. WP automatically displays a menu with its own ul and li tags, and its classes. They don't suit me, tell me how you can either tie your classes to these tags, or print your own tags instead. I tried to replace the tags with my own - I achieved that there is no possibility to transfer the class to the tag. Original menu code:
<nav class="nav-menu"> <a href="#" class="nav-menu--link active-link">Главная</a> <a href="catalog.html" class="nav-menu--link">Продукция</a> <a href="about.html" class="nav-menu--link">О компании</a> <a href="contacts.html" class="nav-menu--link">Контакты</a> </nav> and the fact that I namudril in function:
<nav class="nav-menu"> <?php wp_nav_menu( array( 'theme_location' => 'top', 'menu_class' => 'nav-menu', 'container' => 'false', 'items_wrap' =>'<a class="nav-menu--link active-link"> </a>', ) ); ?> </nav> Link to the long-suffering website: http://kaauto.volodysm.beget.tech/
Judging by what I read about the menu output mechanism - I will need to write my Walker, I looked at its source code - I realized that this is a bad idea. Tell me, please, solutions, the second day I'm already sitting ...
