Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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?

    #1150348

    Hey Telepsy_NL,

    Could you post a link to where we can see the problem you are having please?

    Best regards,
    Rikard

    #1150407

    “Append search icon to main menu” is checked atm

    #1150601

    Hi Telepsy_NL,

    Please have a look at the following thread

    Best regards,
    Victoria

    #1150770

    That 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?

    #1150805

    Hi Telepsy_NL,

    I am glad that the solution helped you.

    Well, yes, you can try a solution for the mobile too.

    Best regards,
    Victoria

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