Problem: The client is experiencing an issue where the Custom 404 Pro plugin, even though translated following the rules, links to the Italian error page instead of the English one when switching languages. This causes the settings for the Italian page to be deleted. Solution: Since the Custom 404 Pro plugin is not officially compatible with WPML, we recommend adding the following custom code to the
functions.php
file in your theme folder:
add_action('template_redirect', function() {
global $wpdb;
// Define the custom table name
$table_options = $wpdb->prefix . 'custom_404_pro_options';
// Get the stored 404 page ID from the custom table
$page_id = $wpdb->get_var("SELECT value FROM $table_options WHERE name = 'mode_page'");
if (is_404() && $page_id && function_exists('icl_object_id')) {
$translated_page_id = icl_object_id($page_id, 'page', true);
if ($translated_page_id && $translated_page_id != $page_id) {
$translated_page_url = get_permalink($translated_page_id);
if ($translated_page_url) {
wp_redirect($translated_page_url, 302);
exit;
}
}
}
});
Please test this code in a staging environment before applying it to your live site. Additionally, consider contacting the plugin authors to encourage them to join our Go Global Program.
If this solution does not resolve your issue or seems outdated, please check our related known issues, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. If necessary, do not hesitate to open a new support ticket.
Problème : Le client a ajouté deux champs personnalisés aux variations de produits (Code article et Code CC) qui ne s'affichent pas dans l'éditeur de traduction. Ces champs ne sont pas gérés par ACF mais créés avec un script PHP dans le fichier functions.php. Solution : Nous avons recommandé de changer le statut de traduction de ces champs en « copy » au lieu de « translate » pour que WPML copie automatiquement ces champs lors de la traduction. Si les champs étaient gérés par ACF, il faudrait modifier le mode de traduction du groupe de champs personnalisés en « expert » via ACF pour ajuster les préférences de traduction pour chaque champ. Comme les champs sont créés via un script PHP personnalisé, nous avons fourni des liens vers la documentation et des ressources pour aider à configurer la traduction de champs créés de cette manière :
Si cette solution ne résout pas votre problème ou semble dépassée, nous vous recommandons de vérifier les problèmes connus, de confirmer que vous avez installé les dernières versions des thèmes et plugins, et d'ouvrir un nouveau ticket de support si nécessaire. Pour toute assistance supplémentaire, veuillez visiter notre forum de support.
Problem: You have a Divi site with WPML and have translated a Divi layout. You want to change the text 'discover this product' to 'discover' but cannot find the string in WPML. Solution: First, we added a custom XML configuration to ensure WPML recognizes the specific shortcode used in your Divi layout. Here is the XML you should add in WPML > Settings > Custom XML Configuration:
If the custom XML configuration does not take effect, the issue might be with the language files. We recommend deleting the language file 'divi-machine-en_US.mo' from the /wp-content/languages/wpml folder. Please ensure to back up your site before making this change.
If this solution does not resolve your issue or seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.
Problem: The client needed help with translating strings in PHP code that were not properly wrapped for translation. Solution: First, we guided the client to wrap all texts in gettext calls as per our documentation. Specifically, we advised checking step number 2.
After modifying the code, we instructed the client to use the String Translation feature in WPML to translate the modified string. The steps included enabling the "Look for strings while pages are rendered" option, visiting the front end to render the string, and then searching for the string in the String Translation interface.
If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket.
Problema: Stai migrando dati da un sito immobiliare multilingue a una nuova configurazione utilizzando il plugin WP All Import Pro insieme all'add-on Houzez e WPML per le traduzioni. Hai bisogno di mantenere gli ID originali per preservare le relazioni esistenti tra agenti, proprietà e traduzioni. Durante il processo di importazione, WordPress genera nuovi ID sia per le proprietà che per gli agenti, e non è chiaro come assicurare che tutte le traduzioni per proprietà e agenti siano correttamente connesse e collegate alle loro versioni originali. Soluzione: Le traduzioni non possono avere lo stesso ID degli originali perché sono post diversi e ciò causerebbe un errore fatale. Questo è dovuto al funzionamento di WordPress, non a WPML. Se stai importando questi contenuti in un sito già esistente che non è vuoto, è probabile che gli ID dei contenuti importati siano già assegnati a qualche altro post, quindi WPML non può utilizzare gli stessi ID che avevi nel vecchio sito. Purtroppo, WPML non dispone di hook o strumenti per mappare i record importati alle loro corrispondenti traduzioni basate su un identificatore unico esterno. L'unica soluzione è rimappare le relazioni manualmente.
Se questa soluzione non risolve il tuo problema o sembra non essere più attuale, ti consigliamo di aprire un nuovo ticket di supporto. Ti raccomandiamo inoltre di controllare i problemi noti, verificare la versione della correzione permanente e confermare che hai installato le ultime versioni di temi e plugin. Per ulteriore assistenza, visita il forum di supporto WPML.