- This topic has 23 replies, 5 voices, and was last updated 2 years, 4 months ago by Tom.
-
AuthorPosts
-
November 10, 2021 at 4:28 pm #1999320Loïc
I need the top red menu to have drop down but I saw in the doc its only available for primary menu. Do I need to exchange primary and secondary menus for this to work ?
November 10, 2021 at 5:29 pm #1999370LeoStaffCustomer SupportHi there,
Do I need to exchange primary and secondary menus for this to work ?
This method would work if you don’t plan on using the sticky navigation would display the primary menu.
We also can provide a snippet that moves secondary navigation to the top.
Let me know 🙂
November 11, 2021 at 4:10 am #1999811LoïcPlease send me that snippet – do I need to use a plugin to have it worked ?
November 11, 2021 at 4:26 am #1999826DavidStaffCustomer SupportHi there,
To make this change, you need to consider how the theme works and your current site structure:
1. Drop Down Menus are available for both the Theme Navs ie. Primary and Secondary Navigation.
2. Only the Theme Navs have Mobile responsive controls.So if you want to have a sub menu you need to use a theme nav. And if you swap the Primary Nav with the Top bar, then what happens to that on mobile ?
November 11, 2021 at 5:21 am #1999909LoïcWhat I need is that red menu at the top that remains sticky with drop down options … Is it possible ?
November 11, 2021 at 5:35 am #1999931DavidStaffCustomer SupportNo – you can’t add a drop down to the Top Bar.
You would have to replace it with the Primary Navigation but then you have to consider what happens with your current primary nav – as that will no longer be Mobile responsive.November 11, 2021 at 7:36 am #2000083LoïcCan I put the red menu in the header below the grey menu in the top bar and have the drop down ? The grey menu is ony links with no subitems …
November 11, 2021 at 8:31 am #2000480DavidStaffCustomer SupportAnd what happens to the Grey Menu on Mobile ? As it won’t have the hamburger menu if you swap it.
November 11, 2021 at 8:33 am #2000482LoïcRight … Its kind of complicated. What do you advise ?
November 11, 2021 at 7:50 pm #2000917ElvinStaffCustomer SupportHi Loic,
If I may suggest, I think you can use the secondary navigation.
IF the concern is it being sticky, consider doing what was done in this topic: (involves custom script)
https://generatepress.com/forums/topic/sticky-second-navigation/It’s a bit tedious but consider reading the whole discussion as the script evolved but it works for the second nav. 😀
November 30, 2021 at 8:54 am #2031830LoïcHello. I dont understand how to proceed … I want to have some dropdown for the first menu (in red) I can arrange for not having second menu (in grey) on mobile but whatever I try I cant get any dropdown … Which one should be primary and which one secondary – how do I place them ? using GP dashboard or as widgets or elements ? Its not clear at all.
I have looked at the demo site of yours (Elvin) but there is only one nav bat at the top …
Please advise
November 30, 2021 at 9:27 am #2031903DavidStaffCustomer SupportUnless you STOP using the Secondary Navigation in the sidebar the only other option is to set the location of the Menu with Drop Downs in the Primary Navigation.
November 30, 2021 at 10:11 am #2031973LoïcIt is what I tried to do but I cant put it with dropdown in the top red bar.
The menu in the sidebar are conditional menus, the secondary menu shows up when there is no submenu associated.
Thanks,
December 1, 2021 at 3:03 am #2032949DavidStaffCustomer SupportIt would require changing several things to create that layout. Some of which we would need to do in stages.
First it so swap the location of the Top Bar and the Primary Navigation.
To do that add this PHP Snippet to your site:// Primary navigation above top bar add_action( 'after_setup_theme','db_primary_nav_above_top_bar' ); function db_primary_nav_above_top_bar() { remove_action( 'generate_before_header', 'generate_add_navigation_before_header', 5 ); add_action( 'generate_before_header', 'generate_add_navigation_before_header', 4 ); }
this doc explains adding PHP:
https://docs.generatepress.com/article/adding-php/Once that is added we can go through the menus, colors and the social icons.
December 1, 2021 at 8:36 am #2033565LoïcI entered the snippet but the primary navigation did not move to the top bar ….
-
AuthorPosts
- You must be logged in to reply to this topic.