Archived topic
Before Header vs NavMenu
8 replies · Started by Adrian Cojocariu on August 11, 2015
Any way I can show the navmenu above the header, but under the before header hook ?
Doesn't necessary have to be a hook, but I want to place a bar with phone and email that always stays there at the top.
I want the navmenu above the header, and that bar above the navmenu :D
Hi Adrian,
Try this:
add_action( 'after_setup_theme','generate_move_before_header_nav' );
function generate_move_before_header_nav()
{
remove_action( 'generate_before_header', 'generate_add_navigation_before_header', 5 );
add_action( 'generate_before_header', 'generate_add_navigation_before_header', 15 );
}
No effect man, nav menu still above it.
I added it in functions.php and tried adding it as a separate PHP code in GP hook.
I'm using exhibit child theme if that helps ? Should I modify the generatepress theme functions.php ?
Hmm, no - I would create a plugin for your functions in that case (https://generatepress.com/knowledgebase/adding-php-functions/ - #2).
Is it the primary menu you're trying to move, or the secondary menu?
Ok so in Personalize, the navigation position is above header, and I created a new plugin for the code but the Before Header GP Hook is still under the navmenu :(
Are you working with the main navigation or the secondary navigation?
If it's the main navigation, the code above should definitely work.
Let me know :)
It's the main nav, forgot to say.
At first no nav was selected, but then I created a menu in WP and set it as Main Navigation through GP personalize :(
Hmm, any chance you can shoot me temporary admin login details to support@generatepress.com?
