[Gelöst] change placeholder in Front-End Forms for Connecting Posts
This support ticket is created vor 4 Jahren, 7 Monaten. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.
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?