Avada Forums Community Forum How can I add a search icon to the Secondary Top Menu?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • shannonlynd
    Participant
    Post count: 4

    I only see the option to add it to the Main Menu.

    Can I add it to the menu via a custom link?

    shannonlynd
    Participant
    Post count: 4

    I ended up adding the code for the search field in the header Contact Info field, and it seems to work.

    zdubajic
    Participant
    Post count: 2

    Which code did you add?

    shannonlynd
    Participant
    Post count: 4

    In the Phone Number field I added the following:

    <nav id=”search-nav” class=”fusion-main-menu” aria-label=”Main Menu” style=”overflow: visible;”><ul role=”menubar” id=”menu-main-menu” class=”fusion-menu”><li class=”fusion-custom-menu-item fusion-main-menu-search fusion-last-menu-item”><div class=”fusion-custom-menu-item-contents” style=”display: none;”><form role=”search” class=”searchform fusion-search-form” method=”get” action=”http://cajuntravels.com/”><div class=”fusion-search-form-content”> <div class=”fusion-search-field search-field”><label class=”screen-reader-text” for=”s”>Search for:</label><input value=”” name=”s” class=”s” placeholder=”Search …” required=”” aria-required=”true” aria-label=”Search …” type=”text”></div><div class=”fusion-search-button search-button”><input class=”fusion-search-submit searchsubmit” value=”” type=”submit”></div></div> </form> </div></nav>

    softwares_zudo
    Participant
    Post count: 3

    How can I add a search icon to the Secondary Top Menu?

    franck_bechdolff
    Participant
    Post count: 2

    Same ask for me.
    How can we do a search icon to the Secondary Top Menu ?
    thanks.

    franck_bechdolff
    Participant
    Post count: 2

    find solution:
    add this in you function.php from theme child.

    
    /** SEARCH TOP NAV MENU */
    
    function head_nav_search($items, $args) {
        if( !($args->theme_location == 'top_navigation') ) 
        return $items;
        return $items . '<li>' . get_search_form(false) . '</li>';
    }
    add_filter('wp_nav_menu_items', 'head_nav_search', 10, 2);
    
    Dewdan
    Participant
    Post count: 14

    How could I add a call for action instead of the search button?
    I’d like to add a button to work for our call to action and put it on the right side of the secondary top menu.

    Cheers

    jfhenane
    Participant
    Post count: 2

    Hello Franck,

    This code doesn’t work with the last version of the theme, 6.0, does it still work for u?

    Maksvzw
    Participant
    Post count: 4

    Hello jfhenane,
    I just verify and yes, the code work.

    jfhenane
    Participant
    Post count: 2

    Humm it doesn’t work for me. Did you kept the button ON in Menu / Main Menu
    Main Menu Search Icon
    Turn on to display the search icon in the main menu.

    ?

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