The text you are referring to might not be coming from a plugin or your theme. It could be dynamically generated or hardcoded somewhere within your theme files or a plugin.
Since Loco Translate doesn’t find it, I suggest using your browser’s developer tools (right-click > Inspect) to locate the source of the “Go to” text.
Hi @mischi98
The issue could be this text is added as a placeholder for the search field, and that’s why Loco Translate can’t find it. Placeholder text is often hardcoded in the HTML or JavaScript and not part of the translatable strings registered with WordPress.
You can use a plugin like String locator to find where the text is from. That always does the trick.
Hi @mischi98
To translate the “Go to…” text:
- Use Loco Translate: Ensure you’re translating the correct text domain. Check if it’s under a different domain or use the “Say What?” plugin to change it.
- Check Theme/Plugin Files: Look in the
.php
files related to search functionality for the string.
- Use
functions.php
: Add a filter to replace the text if it’s custom:phpCopy code
add_filter( 'gettext', 'my_custom_translate', 20, 3 ); function my_custom_translate( $translated_text, $text, $domain ) { if ( 'Go to...' === $text ) { $translated_text = 'Your translation'; } return $translated_text; }
- Plugin Conflict: Disable plugins that affect search/navigation to isolate the cause.
Hope this helps.
-
This reply was modified 1 month, 3 weeks ago by
Kausar Alam.
Thanks, I will download String Locator 🙂
Thanks You Lina as well 🙂
Dear @kausaralm thank you very much for your description and help.
You are welcome @mischi98