Archived topic
Hide Off-Canvas Menu When Viewport Is Not Mobile
5 replies · Started by Michael Largue on May 18, 2019
Hi Tom
From what I can see, the off-canvas sidebar is used for displaying the mobile view of the main menu together with any other elements that one chooses to put in there. How can I hide the display of the menu while leaving the other elements on the desktop (i.e. for any non-mobile view or when the viewport is greater than 1000px wide)?
Also, How can I attach a menu title (e.g. Navigation) to the off-canvas menu when it is displayed off-canvas?
Kind Regards
Michael
Hi there,
To hide certain elements on certain devices, you can use the built-in hide-on classes:
https://docs.generatepress.com/article/responsive-display/#using-our-hide-on-classes
How can I attach a menu title (e.g. Navigation) to the off-canvas menu when it is displayed off-canvas?
Not exactly sure what you mean. Can you link me to the site in question?
Let me know :)
Hi Leo
The menu, as it displays in the off-canvas, does not have a heading, merely the menu items. Because I am sharing both menu and widgets in the off-canvas, I want the menu to have a heading as well.
Regards
Michael
Would use the Navigation Menu widget option work for you?
Then you can add title.
Let me know :)
Hi Leo
I'll give it a shot.
Michael
Sounds good. Let me know :)