Problem: The client is using Elementor and WooCommerce to display carousels with links to product attributes (brands) that are set to 'not translatable'. The links should link to the current language version, but WPML is altering them to the default language. The client wants these specific links to remain unchanged in the translated pages. Solution: We recommended adding a custom filter to the theme's functions.php file to prevent WPML from altering these specific links. Here is the code snippet to add:
This code will add the specified brand to a blacklist, preventing WPML from translating the URL. For more information on managing sticky links in WPML, visit WPML Sticky Links documentation.
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.
Problem: You need to change the footer content of your DIVI theme and cannot find the footer template in the translation management page after modifying the default English content. Solution: If you're experiencing this issue, we recommend checking the specific post types for your DIVI theme's footer, header, and body layouts directly in your WordPress admin area. You can access these areas using the following links:
Please visit the following URLs and check if you can translate the templates.
Footer: yourdomain/wp-admin/edit.php?post_type=et_footer_layout
Header: yourdomain/wp-admin/edit.php?post_type=et_header_layout
Body: yourdomain/wp-admin/edit.php?post_type=et_body_layout
This solution might be irrelevant if it's outdated or not applicable to your case. 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 this does not resolve your issue, please open a new support ticket with us for further assistance.
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: You are developing a site using WPML's auto-translate feature and have encountered an issue where links within content translated using the Advanced Custom Fields (ACF) remain in the original language and point to the main language pages. Solution: To resolve this issue, you need to modify your template code to ensure that links are correctly translated and point to the appropriate language versions. Here is a step-by-step guide:
Ensure that your ACF link field is set to 'Translate' to allow for the translation of the link URL and text.
Modify your template code to use the
wpml_permalink
filter for translating the URL, and the
wpml_translate_string
filter for translating the link title. Here is an example of how you can implement this:
Adjust the return value of the link field to 'Link URL' to ensure the correct data type is used for URLs.
Please note that this solution might be outdated or not applicable to your specific case. If this solution does not resolve your issue, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket.
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 cercando di visualizzare diversi filtri nella pagina shop in inglese del tuo sito, ma vedi solo il filtro 'Marca' con il label in italiano. Utilizzi l'opzione 'usa la traduzione se disponibile oppure lascia la lingua predefinita' per i prodotti, che sono circa 20.000 e non vuoi tradurli manualmente. Soluzione: Il problema principale è che non puoi tradurre le tassonomie se imposti i prodotti sul 'fallback nella lingua di default'. I prodotti non esistono nell'altra lingua, mentre la tassonomia sì, e non puoi assegnare una tassonomia a un prodotto che non esiste in quella lingua. Il filtro 'Marca' appare perché non è stato tradotto, dato che il nome delle marche è lo stesso in tutte le lingue. Per risolvere questo, devi duplicare i prodotti. Per la duplicazione automatica di nuovi prodotti, puoi utilizzare degli hook specifici di WPML. Consulta i seguenti link per maggiori dettagli:
Se questa soluzione non risolve il tuo problema o se ritieni che le informazioni siano obsolete, ti invitiamo a aprire un nuovo ticket di supporto. Ti consigliamo inoltre di verificare le problematiche note, controllare la versione della soluzione permanente e confermare di avere installato le ultime versioni dei temi e dei plugin.