-
AuthorPosts
-
May 10, 2019 at 9:22 am #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?
May 13, 2019 at 9:03 am #1099940Hi guys,
any ideas about the search icon?
thx,
RitchieMay 13, 2019 at 7:35 pm #1100229Hi 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,
VictoriaMay 15, 2019 at 5:16 pm #1101129Hi @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,
RitchieMay 15, 2019 at 5:27 pm #1101133Use custom css to do that. There are many tutorials online on how to modify these.
May 16, 2019 at 10:04 am #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;}
May 20, 2019 at 6:36 am #1102375 -
AuthorPosts
- The topic ‘Replacing the search box icon with text’ is closed to new replies.