Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #278130

    Hi!
    I require some assistance, how do I have the search bar from magnifying glass to become directly the search bar, skipping the hassle of pressing on the “magnifying glass” to get the search bar out!
    Help appreciated as always!
    Regards,
    Kayzel

    #278445

    Hey Kayzel!

    Thank you for using the theme!

    You can add this on functions.php:

    add_filter( 'wp_nav_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 == 'avia') || (is_string($args) && $args = "fallback_menu"))
    	    {
    	        global $avia_config;
    	        ob_start();
    			$getform = get_search_form(false);
    
    	        $items .= '<li id="menu-item-search" class="noMobile menu-item menu-item-search-dropdown">'.$getform.'</li>';
    	    }
    	    return $items;
    	}

    Add this on Quick CSS or custom.css:

    #top #searchform > * {
    opacity: 1 !important;
    display: block !important;
    }

    Cheers!
    Ismael

    #278956

    Hi there! When I added that code to the functions.php and update it, the entire admin panel cant be accessed and the entire web went into blank! I reset it via cpanel! Any ideas why?
    Cheers!

    #278988

    Hi!

    There may be a typo in the code, this normally happens when you copy it directly from the mail message. Make sure the greater than (<) signs are written correctly.

    Regards,
    Josue

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