Archived topic
Change order of Header
4 replies · Started by Tom on July 23, 2017
Hello, I am starting to dig into GeneratePress and trying to do something simple (at least I thought it was :).
I would like to have the Secondary Menu at the top, then Primary Menu then Header. So far if I put the primary menu above Header in the customizer then I can't have the Secondary Menu above that?
Am I missing something or is this a restriction?
Thanks,
-Tom
Hi there,
Try inserting the secondary navigation in the top bar widget area: https://docs.generatepress.com/article/top-bar-widget-area/
Let me know if this solution works for you :)
That adds the top bar widget area into the secondary navigation, so it will still display below the primary navigation.
Try adding this function:
add_action( 'after_setup_theme', 'tu_move_secondary_nav' );
function tu_move_secondary_nav() {
remove_action( 'generate_before_header', 'generate_add_secondary_navigation_before_header', 7 );
add_action( 'generate_before_header', 'generate_add_secondary_navigation_before_header', 2 );
}
Both options are workable so I looks like I am good there.
Thanks!
No problem :)