Archived topic
Can't move elements page header above navigation
3 replies · Started by Greg on October 10, 2019
I can't seem to move the Elements page header above the primary navigation. I've disabled the top bar and header on the website page itself (from within the WP editor for the page) and I've set the Elements page header navigation location to "Below Header" but still no joy. From what I understand the Elements page header settings should override anything in the customizer but I can't get it to work.
Hi there,
This PHP snippet should move the header element above primary navigation:
add_action( 'after_setup_theme','craig_move_navigation' );
function craig_move_navigation() {
remove_action( 'generate_after_header', 'generate_add_navigation_after_header', 5 );
add_action( 'generate_after_header', 'generate_add_navigation_after_header', 15 );
}
Adding PHP: https://docs.generatepress.com/article/adding-php/
Let me know if this helps :)
Thanks Leo. That worked a treat but I've noticed that for the mobile view the header flips down below the mobile menu.
Can you link me to the page in question?
Let me know :)