Archived topic
move entire header to above copyright bar
3 replies · Started by sparkle on July 5, 2021
i'd like to move my entire header section to just above the copyright bar on my website. i thought these instructions sounded pretty spot on for what i needed,
https://generatepress.com/forums/topic/move-primary-navigation-to-above-footer-bottom/
but when i added the code to my child theme's functions file,
add_action( 'after_setup_theme', function() {
remove_action( 'generate_after_header', 'generate_add_navigation_after_header', 5 );
add_action( 'generate_before_footer', 'generate_add_navigation_after_header', 1 );
});
nothing changes on my site. any advice?
Hi there,
I believe this will only work if you have "Use Navigation as Header" checked on Appearance > Customize > Layout > Header.
If you don't have that enabled, use this PHP snippet instead.
add_action( 'after_setup_theme', function() {
remove_action( 'generate_header', 'generate_construct_header' );
add_action( 'generate_before_footer', 'generate_construct_header' );
});
great! your second snippet didn't work for me, but i enabled the 'navigation as header' option and the first code will work just fine for me.
thanks!
Glad you got it sorted. No problem. :D