Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #277734

    Hey Everyone,

    I’ve been asked by my client to remove the search magnifying glass that is standard with the Enfold theme (that opens the pop-up AJAX search box below it) and instead just have a regular search box right in it’s place. I’m assuming this isn’t too difficult, but after a couple of hours of searching and sifting through the code, I figured maybe someone else could point me in the right direction?

    Here is the link to their site:

    Thanks for the help as always everyone!
    – John


    Hi jnhaswell!

    Thank you for using the theme!

    You can add this on functions.php to remove the search icon and add the actual search form right after the main menu:

    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;
    			$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;

    Best regards,


    Thanks so much Ismael!!

    I had one more question question related to this. I wanted to see how it would look with the text “Search” right next to the magnifying glass. Just wanted to give myself another option. What would be the best way to accomplish this?



    I can see that “searchform.php” is where the code is stored, but I’m not a pro at editing PHP and continue to get syntax errors when trying to input anything. I believe I just want to add the text before $icon = av_icon_char(‘search’);



    Thank you for the update.

    If you want the search text next to the magnifying glass. Just remove the suggested codes above then add this on Quick CSS:

    #menu-item-search [data-av_icon]:before {
    float: left;
    margin-right: 10px;
    #top .avia_hidden_link_text {
    display: block;
    float: left;



    The above search bar in header via functions.php doesn’t work at all for me. I am using a child theme though if that’s the problem?

    Anyhow, I’ve gone with the search text option (with ‘search’ next to the icon), looks great, although the ‘search’ text isn’t linked like the icon?

    Any ideas?

    This reply has been marked as private.


    Looks like you’re using an old version of the theme. Please update the theme to 3.0.7.


Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.