Archived topic
Mobile custom sidebar menus?
8 replies · Started by Lisa on January 16, 2020
Hello,
I'll be working on a website that is going to have a child page menu on the parent and all relevant child pages.
Looking at the help forum, I found the plugin to create custom sidebars for the different pages and using your CSS I was able to force the sidebar above the content on mobile. The custom menu could easily have 6 - 10 links per parent category.
Do you have any code that could compress the sidebar menu with a dropdown similar to the main menu on mobile?
Thank you for your help,
Lisa
Hi there,
Just to confirm, you'll want to hide all of the links on mobile until a mobile toggle is clicked? Something like that would require some custom javascript.
If you can add a link above the current menu items (in an HTML widget), I might be able to help with the JS.
Let me know :)
Hi Tom,
Yes, in an ideal world a second toggle for the widget menu on mobile is what I'm hoping for. I'm not sure what link you need, though. Is this it? http://l88.e22.myftpupload.com/page-1/ or do you need backend access?
Thank you so much for your help,
Lisa
The only issue I'm seeing here is how to add the toggle into the widget along with the navigation widget. I don't believe it's possible to hook a toggle into that standard widget.
Have you considered using our Secondary Nav module? It does this by default: https://docs.generatepress.com/article/secondary-navigation-layout-overview/
Let me know :)
Hi Tom,
Thank you for your response. I hadn't used the secondary navigation before, thanks for letting me know about it. Is it possible to have the secondary navigation be used with different menus? The Page 1 sidebar menu will be different than the Page 2 sidebar menu.
Thanks for your ideas & suggestions,
Lisa
A plugin like this might help with that: https://wordpress.org/plugins/conditional-menus/
Great idea, I'll reach out to them and let you know how it goes.
Thanks again for your help. We've decided not to have the sidebar menu show on mobile as it will also be in the main nav.
Thank you.
No problem :)