I tried the following code (added to my functions.php file – child theme):
// Change placeholder text for search widget
function wpforo_search_form( $html ) {
$html = str_replace( 'placeholder="Search ', 'placeholder=" ', $html );
return $html;
}
add_filter( 'get_search_form', 'wpforo_search_form' );
The above code removes “Search” but leaves the 3 dots (…).
I tried this:
// Change placeholder text for search widget
function wpforo_search_form( $html ) {
$html = str_replace( 'placeholder="Search … ', 'placeholder=" ', $html );
return $html;
}
add_filter( 'get_search_form', 'wpforo_search_form' );
The above code doesn’t work at all.
What am I missing? Thanks in advance.
]]>
remove_filter( 'get_search_form', 'wpforo_search_form');
// Change placeholder text for search widget
function child_wpforo_search_form( $html ) {
$html = str_replace( 'placeholder="Search … ', 'placeholder=" ', $html );
return $html;
}
add_filter( 'get_search_form', 'child_wpforo_search_form' );
]]>
FYI, I’m not using wpForo (found this function when researching the issue). Strange that it works when you only want to remove “Search” and leave the 3 dots.
]]>