[Resolved] missing secondary menu

Home Forums Support [Resolved] missing secondary menu

Home Forums Support missing secondary menu

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1129472
    Hans

    I want to show the secondary menu above the footer. I use this code (from the forum):

    add_action( 'after_setup_theme', 'lh_move_secondary_nav' );
    function lh_move_secondary_nav() {
        remove_action( 'generate_before_header', 'generate_add_secondary_navigation_before_header', 7 );
        add_action( 'generate_after_footer_widgets', 'generate_add_secondary_navigation_before_header', 7 );
    }

    These are the customizer settings.
    Settings
    The menu bar does not appear!
    Where might be the erroer?

    #1129566
    David
    Staff
    Customer Support

    Hi there,

    that Hook only exists if you have Footer Widgets being displayed.
    You can use the generate_after_main_content instead.

    #1130228
    Hans

    Hi David,

    following your advice I used this code:

    add_action( 'after_setup_theme', 'lh_move_secondary_nav' );
    function lh_move_secondary_nav() {
        remove_action( 'generate_before_header', 'generate_add_secondary_navigation_before_header', 7 );
        add_action( 'generate_after_main_content', 'generate_add_secondary_navigation_after_main_content', 7 );
    }

    Unfortunately the menu is still missing.

    #1130420
    David
    Staff
    Customer Support

    Try:

    add_action( 'after_setup_theme', 'lh_move_secondary_nav' );
    function lh_move_secondary_nav() {
        remove_action( 'generate_before_header', 'generate_add_secondary_navigation_before_header', 7 );
        add_action( 'generate_after_main_content', 'generate_add_secondary_navigation_before_header', 7 );
    }
    #1130439
    Hans

    Hi David,

    I used your code. The image shows the result.

    Secondray menu show up floating

    #1131185
    Tom
    Lead Developer
    Lead Developer

    Let’s try this, instead:

    add_action( 'after_setup_theme', function() {
        remove_action( 'generate_before_header', 'generate_add_secondary_navigation_before_header', 7 );
        add_action( 'generate_footer', 'generate_add_secondary_navigation_before_header', 5 );
    } );

    Let me know ๐Ÿ™‚

    #1131250
    Hans

    Thanks, it works!

    #1131877
    Tom
    Lead Developer
    Lead Developer

    You’re welcome ๐Ÿ™‚

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