Archived topic
Navigation Dropdown hover & click?
5 replies · Started by Kyle on February 24, 2021
I like the option "Click - Menu Item" for Navigation Dropdown so in mobile you can click anywhere on it to drop down, but on desktop I'd rather it be "Hover" so you don't have to click. Is there a way to do this?
Hi Kyle,
Even you set it to Hover, on mobile you'll still need to click to open the drop down :)
Probably should have clarified that my top level pages aren't actual pages, just a parent so clicking on the nav item doesn't open a page. So if I set it to hover then on mobile you have to click the little arrow otherwise nothing happens. If I set it to “Click – Menu Item” you can click anywhere on it to expand but then it removes hover ability from desktop.
You need to give the parent menu item a link, it should be just a "#".
This is how you build submenus:
https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#custom-link
Then you can use hover, it will work for mobile too.
Let me know how it works :)
Thank you! I saw another article/topic somewhere on these forms that said I should make parent pages like that with no URL so that is why I did it. Can't find the post now of course, but it works as expected with the #.
I guess in that post, it might under a different circumstance.
Anyway as long as it works for you :)