Here is my menu in the mobile / tablet version of the site:

enter image description here

After putting the WordPress plugin, when you click on one of the menu lines (for example, shoes), it will unfold (seen in the picture), but this happens if you click to the right of the word itself. And if you click on the word, the menu collapses all the time. How to configure in css so that the menu expands when you click on any place in the line?

  • First you need to see a live example in order to understand what exactly is wrong. - dmitryshishkin
  • ali-coupons.net - Beginner

1 answer 1

There are two menu instances on your page - <div id="primary-nav"> and <nav id="mobile-menu"> . In the HTML source of the page, they look similar, but the debug panel shows that the problematic menu item is wrapped in two links at once:

 <a href="#" role="menuitem" aria-haspopup="true" tabindex="-1" class="slicknav_item slicknav_row" style=""> <a href="#" tabindex="-1">Категория купонов</a> <span class="slicknav_arrow">▼</span> </a> 

If you leave only one link, the list of sub-items begins to unfold as it should.

 <a href="#" role="menuitem" aria-haspopup="true" tabindex="-1" class="slicknav_item slicknav_row"> Категория купонов <span class="slicknav_arrow">▼</span> </a> 

To start, try to leave this item in the mobile menu completely without a link. If one of your scripts adds the missing link, it will work. If you do not add, then you need to dig into the scripts and carefully follow their hands.

  • if I still knew where to change it, in which file. Just there are several php files, where exactly - there are no such lines. You probably in the browser console looked at the situation, do not tell me where to change what you wrote above? - Beginner
  • @Sven I see three ways: 1) find a php-file that creates the HTML code of the mobile menu, and change it so that the headers of the drop-down submenus are not wrapped in a link; 2) find a script that wraps these headers in an additional link and teach it to simultaneously delete the link added by WordPress; 3) write a script that will remove unnecessary links from the menu. In any case, you have to dig in the code, and google. - Gleb Kemarsky