[Resolved] Move Secondary Navigation before footer

Home Forums Support [Resolved] Move Secondary Navigation before footer

Home Forums Support Move Secondary Navigation before footer

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1502930
    Chitika

    Hello.
    I’m trying to add this code –

    add_action( 'after_setup_theme', function() {
        remove_action( 'generate_after_header', 'generate_add_secondary_navigation_after_header', 5 );
        add_action( 'generate_before_footer', 'generate_add_secondary_navigation_after_header', 1 );
    });

    But the secondary navigation appears both above and below.
    How to make it appear only once.
    I removed the code btw,

    #1503239
    David
    Staff
    Customer Support

    Hi there,

    try this instead.

    1. Set the Customizer > Layout > Secondary Navigation –> Location to No Navigation
    2. Add this PHP Snippet:

    add_action( 'generate_before_footer', 'generate_secondary_navigation_position', 1 );

    #1503289
    Chitika

    Thanks @David. That worked perfectly.

    #1503627
    David
    Staff
    Customer Support

    You’re welcome

    #2439305
    David

    Hi David, just following on from this, I’d like to position the secondary menu in between the footer widgets and the footer bar. Could you please provide an updated snippet? Thanks!

    #2439434
    David
    Staff
    Customer Support

    So this line:

    add_action( 'generate_before_footer', 'generate_secondary_navigation_position', 1 );

    becomes:

    add_action( 'generate_after_footer_widgets', 'generate_secondary_navigation_position', 1 );

    #2439481
    David

    Thank you David…

    #2439588
    David
    Staff
    Customer Support

    You’re welcome

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.