Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client wants to prevent WPML from automatically creating strings for the Blog Title and Tagline every time the General Settings page is saved. These strings are shared across sites but should remain unique and untranslated for each site. Despite attempts to delete these strings from the WPML interface, they reappear after settings are saved.
Solution:
We explained that WPML does not provide a hook to prevent the registration of default WordPress strings like Blog Title and Tagline in the WPML String Translation. These strings are automatically saved once option values are updated in WordPress. The client can delete the strings at WPML > String Translation or adjust their translation as needed. Additionally, the actions triggered when these options are updated are:

add_action( 'update_option_blogname', 'icl_st_update_blogname_actions', 5, 2 );
add_action( 'update_option_blogdescription', 'icl_st_update_blogdescription_actions', 5, 2 );

For more details on WPML hooks, visit WPML Hooks Reference.
Please note, we do not support custom code modifications and cannot take responsibility for issues arising from custom implementations. For our support policy, see WPML Support Policy.

If this solution does not apply to your case, or if it seems outdated, we recommend opening a new support ticket. We also highly suggest checking related known issues at WPML Known Issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum at WPML Support Forum.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 5 replies, has 0 voices.

Last updated by Andreas W. 1 month ago.

Assisted by: Andreas W..

Author Posts
June 4, 2025 at 12:50 am #17104262

vincentP-19

Background of the issue:
I want to prevent WPML from creating strings for the Blog Title and Tagline from the General Settings page when it's saved on my site hidden link.
We are developers and can add hooks if there is one we missed.

Symptoms:
No specific issue or error message mentioned.

Questions:
How can I prevent WPML from creating strings for the Blog Title and Tagline?

June 4, 2025 at 1:42 am #17104323

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

We do have hooks to register strings and to display their translation but we sadly do not have any hook to prevent those default WordPress strings from being registered on
WPML String Translation.

WPML Hooks:
https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/

Usually, those strings are saved automatically once option values are saved.

You can try deleting the strings at WPML > String Translation or adjust their translation to their need, like for example using the same text in all languages.

Best regards
Andreas

June 4, 2025 at 2:17 pm #17107012

vincentP-19

Thank you for the follow-up Andreas,
We have a special setup where two sites share the same strings table and these two strings (blogname, blogdescription) are the only ones that should be unique per-site (we don't want to translate them either).

It works when we delete them from the WPML interface, but they keep coming back every time we save settings.

We wondered if your team knew about which hook is being used by WPML to re-create them, so that we could override it. We tested the "wpml_register_single_string" hook to no avail.

We also thought, maybe there's a setting we can disable to make these untranslable.

If you have no hint for us, we'll keep digging through the hooks with trial-and-error!

June 4, 2025 at 3:49 pm #17107407

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Please note that our support does not provide custom code solutions, and we cannot guarantee or offer support for custom code on your site.

Our support policy:
https://wpml.org/purchase/support-policy/

I have tried to apply various hooks to solve this issue, but it sadly does not work. I consulted one of our devs about it and he confirmed that there is no way to prevent the registration of those options, as the registration is hardcoded inside WPML.

June 4, 2025 at 8:44 pm #17108158

vincentP-19

We understand, thank you for your efforts!

Would you be able to point us towards which files are involved with the process?
Our devs will look into it from there and hopefully we find a way to do so.

June 5, 2025 at 12:12 am #17108296

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

What is called inside function.php of WPML String Translation once one of the options is updated in WordPress is:

add_action( 'update_option_blogname', 'icl_st_update_blogname_actions', 5, 2 );
add_action( 'update_option_blogdescription', 'icl_st_update_blogdescription_actions', 5, 2 );

You can find more details if you extract the WPML String Translation plugin archive, open it inside a Text Editor and search for "blogname".

I can not suggest taking direct changes inside one of our plugins, but if you can achieve your expected behavior with one of the available hooks, then feel free to do so.

Only please understand, that if your custom architecture leads to unexpected database or display issues between the different sites that share the same string tables, then our support cannot take responsibility for that.