Archived topic
Place Primary / Secondary menus in non standard locations?
5 replies · Started by Kip on February 17, 2023
Hi,
I'm currently using Customizer to place our Primary Navigation in the "Below Header" position. However due to some advertising constraints (they want a 100px max height for the nav), and my desire to use Secondary Navigation as well for a "trending" menu, either right above or right below the primary nav, I'd like to place the navigations say above the main content, so within the content container but in the same place visually. I found this ticket https://generatepress.com/forums/topic/boxed-logo-item-in-combination-with-secondary-nav/, but not sure if I can use "above-main-content" or whatever to re-place the navs.
Obviously I could just use some php with wp_nav_menu to place any menu anywhere, but this does not afaik then work with the Customizer, and I'd like to keep the customizations all in one place if possible.
Hi Kip,
and I’d like to keep the customizations all in one place if possible
If there's no such option for what you are trying to achieve in the customizer, PHP code will be required.
Can you show us the site so we can have a better idea of what you want?
Maybe a mockup if it's possible.
the question boils down to this: in the Customizer (Customizer>Layout>Primary Navigation), you're presented with a list of options for where you can place the menu:
-Below Header
-Above Header
-Float Right
-Float Left
-Left Sidebar
-Right Sidebar
-No Navigation
I'm just wondering if it's possible to amend that list, to include (for example: generate_before_main_content). If not, it's not that big a deal, I can just create the menus the old fashioned way and place them with php:
wp_nav_menu( array( 'theme_location' => 'custom-menu' ) );
I’m just wondering if it’s possible to amend that list, to include
No, unfortunately, it's not possible and it's very complicated to modify the interface of the customizer.
Appreciate the response, you can close the ticket :)
No problem :)