Archived topic
Off Canvas Panel to be fired ONLY on specific link click.
5 replies · Started by Yannick on October 4, 2019
Hi!
I have added an off-canvas panel to my website, but it seems like the main navigation menu is firing it off when it's on mobile. I want it to be fired ONLY when the user clicks on a specific link in the content (not the menu).
Note that I have removed the "burger" from the main navigation menu.
Hi there,
Try adding menu-toggle as a custom class to the menu item you want to use to activate the off canvas panel:
https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#custom-classes
Let me know if this helps :)
Maybe I didn't explain myself properly...
Right off the bat, without any modification, when I click on the Main Navigation Menu on a phone, it fires off the off-canvas panel. I want this disabled as I want it to be fired by a link in the content of a page.
Thought you said you've removed the burger on mobile though no?
Any chance you can link me to the page in question?
Never mind. Your reply made me think of something!
I disabled it on mobile, but I can still fire it off with the slideout-toggle class anywhere :)
Thanks for your help Leo!
No problem :)