Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1099219

    Dear @Ismael,

    I need to filter the placeholder and icon in Enfold’s search box.

    In this thread (https://kriesi.at/support/topic/edit-the-search-form/) I found your solution for filtering the placeholder:

    add_filter('avf_frontend_search_form_param', avf_frontend_search_form_param_mod, 10, 1 );
    function avf_frontend_search_form_param_mod( array $params )
    {
    	$params['placeholder'] = __('My Search','avia_framework');
    	return $params;
    }

    This works perfectly. But I also need to filter the submit icon (the magnifying glass), replacing it with the word “search”. In the same thread, I found CSS to hide the box:

    #searchsubmit {
      display:none;
    }
    
    #s::placeholder {
      content:"Your text";
    }

    I tried to add

    $params['searchsumbit'] = __('Search','avia_framework');

    to the script but that didn’t work ;)

    Then I looked at the article about Enfold standard icons (https://kriesi.at/documentation/enfold/icon/#change-icon-used-for-standard-theme-elements-). I didn’t find a solution though to replace the icon with text.

    Is there a way to filter the icon as well?

    #1099940

    Hi guys,

    any ideas about the search icon?

    thx,
    Ritchie

    #1100229

    Hi Ritchie,

    Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Victoria

    #1101129

    Hi @Victoria,

    thanks for the heads-up! Would it be possible to simply adjust the width of the blue box with the magnifying glass in it?

    greetings,
    Ritchie

    #1101133

    Use custom css to do that. There are many tutorials online on how to modify these.

    #1101372

    @smartstartinc You’re absolutely right – I know how to use custom css :)

    Just in case anybody googulates this:

    #searchsubmit {width:130px !important;}
    #s {width:350px !important;
    border:1px solid #d4e4f1  !important;}
    #1102375

    Hi,

    Glad to hear that you fixed it. And thanks for sharing. We’ll close the thread now.

    Have a nice day.

    Best regards,
    Ismael

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Replacing the search box icon with text’ is closed to new replies.