Is your site's original language English or is it a translation ?
What is the default language of the site? You may need to replace this "Search for a post" with the default text that is currently on your post and replace "Custom text here" with the text you want to display instead.
add_filter( 'gettext', 'zoeken_text_func', 20, 3 );
/**
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*/
function zoeken_text_func( $translated_text, $text, $domain ) {
if($text == 'Zoeken naar een bericht' && $domain == ['wp-cred']){
$translated_text = "Zoek een product";
}
return $translated_text;
}
It is not working yet.
By the way, Can you review the code?
I added it to the PHP inserter plugin. I could not reach the functions.php before.
Now I have access to the functions, but when I past the code, an error occured on the website.
So maybe there is a problem with the snippet?
PS In a view, you can add a custom text in a dropdown.
default_label="Zoek een product"
Why is this not possible in a cred form?