I was trying to hook my navigation in the header. I used
/** Reposition the primary navigation menu */
This code drops my nav <div> after all of the header elements. Is there a way to make it drop it at the TOP of the <header>? Is there a way to control where you drop the code in a div?
If you wanted the nav before the header, you could use;
/** Reposition the primary navigation menu */ remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ ); add_action( ‘genesis_before_header’, ‘genesis_do_nav’ );
Or if you wanted it in the header itself but before the title ..etc, you could use;
/** Reposition the primary navigation menu */ remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ ); add_action( ‘genesis_header’, ‘genesis_do_nav’, 9 );
So , 9 tells the hook where to put it in the hook div? Where is documentation I can read to understand how it works.
Peter, thank you so much for letting me know it was doable. I am REALLY in love with Genesis now.
Okay, that is called priority. Thanks Peter. I looked it up. I didn’t realize that was one of the par. of hook
Yeah, sort of
The last number is the priority for the action, which basically dictates when it runs. If it’s got a lower number than other actions, it runs before them. I’m not sure if there is Genesis specific documentation on action priorities, but you can see them if you look through the code.
Edit: Oops, you beat me to it..
The topic ‘A simple HOOK question’ is closed to new replies.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.