[Resolved] Adding a second menu inline after the Primary Navigation menu

Home Forums Support [Resolved] Adding a second menu inline after the Primary Navigation menu

Home Forums Support Adding a second menu inline after the Primary Navigation menu

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2339968
    VR

    Hello,

    What’s the best way to add a secondary menu inline after the Primary Navigation + Navigation Search icon?

    We used the code you provided here to move the Navigation Search icon to be inline with the Primary Navigation. Thanks!

    Then we used a “Hook (generate_after_primary_menu)” Element to add a custom menu (“Main Menu Icons”) (with several social media icons) using this code in the Element:

    `<?php wp_nav_menu( array( ‘menu’ => “Main Menu Icons” ) ); ?>

    Is there a php code snippet we can use to ensure the social icons appear inline with the Main Menu + Search Icon? Right now, they wrap to a new line.

    Thank you

    #2340036
    Fernando
    Customer Support

    Hi Vico,

    One approach is to add them in one menu if you want them to wrap together.

    Then, we can just alter the position through CSS.

    #2340538
    VR

    Thanks. We thought of that, but we felt it would be easier for the Client to manage them as separate menus (because they use funky looking SVG code in the “Name” field and might be confusing to them in the main menu). Also, we’d like the search icon to appear *before* the social icons.

    If there is a way to get the search icon to appear before the social icons *AND* still retain it’s functionality to open a search area when clicked, then we’d be okay with that if you don’t think there’s a straightforward way to add it as a separate menu. Is there a code snippet or some other way we can ensure the search functionality stays intact even if the search icon is added directly as a menu item (instead of using the “Navigation Search” checkbox in the Customizer)?

    Thank you

    #2340748
    David
    Staff
    Customer Support

    Hi there,

    you can try the generate_menu_bar_items hook to add your social icons, as that will output inside the primary navigation after the menu / search icon.

    #2343728
    VR

    Thank you. We used the hook you suggested. Also realized it was wrapping to a new line because the Main Menu itself was wrapping to a second line, so that pushed the social menu down to a third line. Once the menu tabs were adjusted to fit on one line, it works great. Thank you!

    #2343989
    David
    Staff
    Customer Support

    Glad to hear that !

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