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

    if i put this icon into the menu and i start a search in my site in i press enter, i will see the result page but if i click again on the icon this start a new search with no input and i will see an empty result page. the bug is on the icon that after a search if i click again on it start a new search instead show the popup input box.

    enfold version 4.3.1

    #953554

    Hey weasyweb2015,

    Can you show us your web site please so we can try understand and debug?

    Best regards,
    Basilis

    #953781

    sorry.

    with the latest version 4.3.1 if i use this code to put the search icon on the secondary menù i get this bug

    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 ((is_object($args) && $args->theme_location == 'avia2') || (is_string($args) && $args = "fallback_menu"))
    	    {
    	        global $avia_config;
    	        ob_start();
    	        get_search_form();
    	        $form =  htmlspecialchars(ob_get_clean()) ;
    
    	        $items .= '<li id="menu-item-search2" class="noMobile menu-item menu-item-search-dropdown">
    		a href="?s=" rel="nofollow"><span class="avia_hidden_link_text">'.__('Search','avia_framework').'</span>
                    ';
    	    }
    	    return $items;
    	}
    

    can you fix this code please?
    another problem is that the search icon isn’t removed from the primary menù. i get twice.

    • This reply was modified 6 years, 6 months ago by weasyweb2015.
    #954012

    this is the site

    #954040

    i solved the problem

    replaced a href=”?s=” with a href=”#” now seems to be working

    • This reply was modified 6 years, 6 months ago by weasyweb2015.
    #954401

    Hi,

    Great, glad you found a solution and thanks for sharing. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

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