-
AuthorPosts
-
October 22, 2019 at 10:07 am #1150094
Hello,
I’m using Enfold with the Zen Menu Logic plugin, because we use more then 1 main menu.
1 problem though…. The search function of Enfold does not work on all these different menu’s.(as in…it’s gone) And I just want the icon with the dropdown on all the main menu’s.
Can you help me out?
October 23, 2019 at 3:31 am #1150348Hey Telepsy_NL,
Could you post a link to where we can see the problem you are having please?
Best regards,
RikardOctober 23, 2019 at 8:40 am #1150407“Append search icon to main menu” is checked atm
October 23, 2019 at 7:41 pm #1150601Hi Telepsy_NL,
Please have a look at the following thread
Best regards,
VictoriaOctober 24, 2019 at 9:34 am #1150770That did the trick. Code from 2015 still works! Amazing.
if(!function_exists('avia_append_search_nav')) { //first append search item to main menu add_filter( 'wp_nav_menu_items', 'avia_append_search_nav', 10, 2 ); add_filter( 'avf_fallback_menu_items', 'avia_append_search_nav', 10, 2 ); function avia_append_search_nav ( $items, $args ) { if(avia_get_option('header_searchicon','header_searchicon') != "header_searchicon") return $items; if(avia_get_option('header_position', 'header_top') != "header_top") return $items; global $avia_config; ob_start(); get_search_form(); $form = htmlspecialchars(ob_get_clean()) ; $items .= '<li id="menu-item-search" class="noMobile menu-item menu-item-search-dropdown"> <a href="?s=" rel="nofollow" data-avia-search-tooltip="'.$form.'" '.av_icon_string('search').'><span class="avia_hidden_link_text">'.__('Search','avia_framework').'</span></a> </li>'; return $items; } }
PS: This adds the search function in your main menu and the topmenu at the same time. Use this css to hide it in your topmenu (extra menu):
#header_meta .sub_menu #menu-item-search { display: none; }
I also want to add the search icon on the right next to the burgermenu. Do I use the workaround in that thread?
October 24, 2019 at 10:21 am #1150805Hi Telepsy_NL,
I am glad that the solution helped you.
Well, yes, you can try a solution for the mobile too.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.