Avada › Forums › Community Forum › How can I add a search icon to the Secondary Top Menu?
Tagged: menu, search, Secondary Top Menu
-
AuthorPosts
-
I only see the option to add it to the Main Menu.
Can I add it to the menu via a custom link?
I ended up adding the code for the search field in the header Contact Info field, and it seems to work.
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>
How can I add a search icon to the Secondary Top Menu?
Same ask for me.
How can we do a search icon to the Secondary Top Menu ?
thanks.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);
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
Hello Franck,
This code doesn’t work with the last version of the theme, 6.0, does it still work for u?
Hello jfhenane,
I just verify and yes, the code work. -
AuthorPosts
- You must be logged in to reply to this topic.