- This topic has 7 replies, 3 voices, and was last updated 1 year, 6 months ago by Tom.
December 3, 2020 at 6:11 am #1565628softrainwall
I use primary menu for desktop and off canvas menu for mobile.
I use “#” URL for all parent items in my off canvas menu and it works almost exactly as I want with one exception: clicking on the menu item itself doesn’t close all other submenus that are opened, only clicking on its arrow does. I want to make my “#” menu items close all other dropdowns on click too, because in my case, being able to open more than one dropdown at a time can make the menu look confusing and lead to an uncomfortable amount of scrolling.
I was able to achieve this by selecting “Click – Menu item” option in Layout -> Primary Navigation -> Navigation Dropdown. However, I only want this for my mobile off-canvas menu, and this option obviously affects my desktop menu as well (which I want to keep as is, with dropdowns on hover).December 3, 2020 at 2:49 pm #1566490TomLead DeveloperLead Developer
I wonder if this might help?: https://generatepress.com/forums/topic/slide-out-menu-close-sub-menu-items/
Let me know 🙂December 3, 2020 at 3:37 pm #1566533softrainwall
Just tried it on both desktop and mobile, and it doesn’t seem to work. The hook does appear in the page’s source so I’m guessing I’ve added it correctly.December 4, 2020 at 8:57 am #1567525DavidStaffCustomer SupportDecember 4, 2020 at 10:50 am #1567692softrainwall
Sure, I’m including a link to the site & login credentials in the private info field. I’ve also temporarily enabled off-canvas menu on desktop for testingDecember 4, 2020 at 12:23 pm #1567798TomLead DeveloperLead Developer
Can you try the updated code?: https://generatepress.com/forums/topic/slide-out-menu-close-sub-menu-items/#post-795721December 4, 2020 at 12:44 pm #1567822softrainwall
It works now! Thank you for help 🙂December 5, 2020 at 11:45 am #1568720
- You must be logged in to reply to this topic.