WordPress – Modify Search Widget Placeholder Text
Have you ever needed to modify the placeholder text that is associated with the default WordPress Search widget? To add your own custom text all you need to do is add this code to your theme’s functions.php file and customize the text as needed.
/* ----------------------------------------------------------
Search Widget Placeholder Text
---------------------------------------------------------- */
function my_frontend_search_form_param( array $params ) {
$params['placeholder'] = __('Search ...','avia_framework');
return $params;
}
add_filter('avf_frontend_search_form_param', 'my_frontend_search_form_param', 10, 1 );

Leave a Reply
Want to join the discussion?Feel free to contribute!