- This topic has 8 replies, 3 voices, and was last updated 3 months, 4 weeks ago by
Fernando.
-
AuthorPosts
-
April 13, 2022 at 6:25 am #2187427
fredparson
Hi I’m looking for the mobile menu code could you please help.
Implementing the code from this website just need to echo out the mobile menu dropdown.
https://wisdmlabs.com/blog/4-easy-steps-to-adding-a-mobile-menu-on-your-wordpress-website/
<?php /* The below code checks if a mobile-menu is set from the backend in the menu settings. If a menu has been set it will be displayed in the header. Or else, a menu has not been set then display a message.*/ if ( function_exists('has_nav_menu') && has_nav_menu('mobile-menu') ) { echo ""; } ?>
April 13, 2022 at 6:34 am #2187435David
StaffCustomer SupportHi there,
why not use the Mobile Menu built into GP ? What am i missing 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 13, 2022 at 6:38 am #2187438fredparson
The drop down menu looks fine in mobile but is spread out on a desktop website browser. I would like them to look pretty much the same. so two menu’s. Canvas doesn’t offer a drop down menu. So if I could get the code for menu by name that would be great.
April 13, 2022 at 6:42 am #2187454fredparson
Or a way to remove the top level of submenu from mobile and just display the second categories.
April 13, 2022 at 7:11 am #2187482David
StaffCustomer SupportCan i see the site so i can get a better understanding of the changes
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 13, 2022 at 3:07 pm #2188102fredparson
Sorry site isn’t live at the moment. Here are the menu’s though.
April 13, 2022 at 5:19 pm #2188153Fernando Customer Support
Hi Fred,
If you’re wanting to make the Nav identical for Desktop and mobile more or less, wouldn’t setting the Mobile menu breakpoint to either
2000
or0
work? This can be found in Appearance > Customize > Layout > Primary Navigation: https://share.getcloudapp.com/lluEgKLGIf you’re referring to something else, may you kindly take a larger screenshot of both? Kindly try including the entire header.
Hope to hear from you soon. 🙂
April 14, 2022 at 4:53 am #2188515fredparson
Found a work around. This opens the mobile menu so you don’t have to click twice, and hides the extra menu item in mobile menu.
.main-navigation.toggled .main-nav ul ul.sub-menu { position: relative; top: 0; left: auto!important; right: auto!important; width: 100%; pointer-events: auto; height: auto; opacity: 1; display: block; visibility: visible; } .main-navigation.toggled .main-nav li:last-child > a { display:none; }
April 14, 2022 at 5:15 pm #2189217Fernando Customer Support
Glad you found a workaround! Feel free to reach out anytime you’ll need assistance with anything else. 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.