Tagged: second menu
-
AuthorPosts
-
May 30, 2024 at 12:39 pm #1447068
Is there a way to create a second menu and have it appear as a hamburger menu and only on one half of the page? The other half should contain a logo.
This is for a landing page. There will be no links to the main site, only anchor links to skip down the page.Regards
NinaJune 1, 2024 at 4:40 pm #1447294Hey Advantage09,
Thank you for your patience, you can create a second menu and use it in the setting Enfold Theme Options ▸ Main Menu ▸ General ▸ Alternate Menu For Mobile I believe that this will achieve what you are trying to do.Best regards,
MikeJune 2, 2024 at 1:13 pm #1447444Well – if that is what I think you want, then there is no trivial solution.
i did it here for very small screens (mobile device screen width) on : https://guenterweber.com/datenschutz/
because the widget ( second menu) on that page needs more place – that is not there on small screens.Base of even the Enfold Hamburger (av-hamburger–spin) for main-menu is : https://jonsuh.com/hamburgers/
June 3, 2024 at 9:43 am #1447534Thanks for your reply. To Mike, This is not going to work, I am looking for separate menu just for one page with no links back to the rest of my site. What would be ideal is if the fullwidth submenu could fit into a single column layou element.
Guenni007, I will take a closer look at your suggestion.Regards
NinaJune 3, 2024 at 11:54 am #1447543Hi,
To show a different menu on one specific page, first make the menu that you wish and hover over the Delete Menu link and at the bottom of the page your browser should show the source of the link, looks for &menu=XX the XX will be a number, in my example it is 11
Next we need to know the page ID, so hover over the admin menu Edit Page in the admin toolbar, and at the bottom the browser should show the source link, look for ?post=XX again the XX will be a number, in my example it is 3792
Now we will add this code to the end of your child theme functions.php file in Appearance ▸ Editor or if you are not using a child theme you could use the WP Code plugin then add a new snippet, in the top right corner use the PHP snippet as the code type:
and ensure that it is activated, then add this code and save.add_filter( 'wp_nav_menu_args', 'ppen_nav_menu_args' ); function ppen_nav_menu_args( $args = '' ) { if($args['theme_location'] === 'avia') { if( is_page( 3792 ) ) { $args['menu'] = '11'; } return $args; } }
Now that page will have our new menu.
Best regards,
MikeJune 3, 2024 at 2:53 pm #1447554so it is not a second menu meant but a different one ?
June 3, 2024 at 4:07 pm #1447559A different menu, ment for just one page.
I am trying a few things out to see if I can get something that will work.Regards
NinaJune 3, 2024 at 8:51 pm #1447594 -
AuthorPosts
- You must be logged in to reply to this topic.