[Resolved] Move secondary navigation after header element

Home Forums Support Move secondary navigation after header element

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1385676
    valentin

    Hi there,

    After a look in the forum for answers I tried this:

    add_action('after_setup_theme','craig_move_navigation');
    function craig_move_navigation() {
    	remove_action('generate_after_header', 'generate_add_secondary_navigation_after_header', 5 );
    	add_action('generate_after_header', 'generate_add_secondary_navigation_after_header', 15 );
    }

    Priority: 15 / Execute PHP / the secondary nav location is seted to No Navigation in customizer.
    I have tested the code for one page only but it displays me the code instead of the navigation.

    Could you please let me know what have I done wrong.

    Thank you.

    #1385685
    David
    Staff
    Customer Support

    Hi there,

    You cannot add that code to a Hook – use one of the methods provided here:

    https://docs.generatepress.com/article/adding-php/

    And you will need to set the Secondary Navigation Location to After Header.

    #1388040
    valentin

    Thanks

    #1388045
    David
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.