Reply To: Secondary menu/Hooks

Home Forums Support Secondary menu/Hooks Reply To: Secondary menu/Hooks

Home Forums Support Secondary menu/Hooks Reply To: Secondary menu/Hooks

#88833
Tom
Lead Developer
Lead Developer

Hmm, well using negative margins and whatnot will cause weird issues like this – it’s usually best to avoid them.

We can move the secondary navigation below the hook with this code:

add_action('after_setup_theme','generate_move_secondary_nav');
function generate_move_secondary_nav()
{
      remove_action( 'generate_after_header', 'generate_add_secondary_navigation_after_header', 7 );
      add_action( 'generate_after_header', 'generate_add_secondary_navigation_after_header', 11 );
}

You can add the above code using your child theme’s functions.php file, or this plugin: https://wordpress.org/plugins/code-snippets/

Doing so will make it so you no longer have to use negative margins.

Let me know 🙂