Archived topic
Secondary Navigation Position
3 replies · Started by Rob on August 9, 2016
Would it be possible to get an option that allows you position the secondary navigation menu inside the wrapper of the primary navigation ?
I'm trying to create this kind of menu layout https://washington.org/ which currently isn't possible as the secondary nav menu is outside of the primary nav menu which is the one that contains the logo
Any reason why you're not using the regular logo (Customize > Site Identity) and then just float the navigations?
Hi Tom,
I don't follow, I am using the regular logo and floating them but the Secondary Nav menu is outside of the header element.
So when you float it left its always going to be above the logo or below the logo.
In my original link you can see both menus float left and align beside the logo. So if there was an option to position secondary nav above or below primary nav within the <header> container you could achieve this effect.
Hmm, definitely kind of a tough one.
You can place the secondary navigation into the main navigation container with something like this:
add_action('after_setup_theme','generate_float_navigation_below');
function generate_float_navigation_below()
{
remove_action( 'generate_before_header_content', 'generate_add_navigation_float_right', 5 );
remove_action( 'generate_before_header', 'generate_add_secondary_navigation_before_header', 7 );
add_action( 'generate_after_header_content', 'generate_add_navigation_float_right', 5 );
add_action( 'generate_inside_navigation', 'generate_add_secondary_navigation_before_header', 7 );
}
That would place the secondary navigation (if set to before header) inside the main navigation, above it.
Let me know if that gets you closer :)