Problem: The client wants to modify the batch name on their site using functions.php but is unsure if there is a WPML hook available for this purpose. Solution: We reviewed the client's request and confirmed that there is no existing WPML hook that allows modification of the batch name directly from functions.php. This task requires custom development, which is outside the scope of our support.
If this solution does not apply to your situation, or if it seems outdated, we recommend opening a new support ticket. We also advise 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. For further assistance, please visit our support forum.
Problem: The client is using WPML for automatic translations on their site but encounters issues where posts marked as translated do not display translations. Additionally, there are problems with translating custom post types (CPT) that use a custom table, and questions about the translation of strings on the front end and the associated costs. Solution: If you're experiencing issues with translations not appearing on posts or handling custom post types, we recommend the following steps: 1. Ensure that your CPT is registered according to WordPress Coding Standards and does not use a custom table, as WPML typically supports CPTs that follow these standards. 2. Check WPML > Settings > Custom Field translation to ensure that any custom fields used by your CPT are set to "Translate". This setting allows the fields to be translated along with the post in the WPML Translation Editor. 3. For translating custom post taxonomies, navigate to WPML > Taxonomy Translation. Taxonomies are usually translated once with the WPML Translation Editor while translating a post they are assigned to.
Unfortunately, there are no hooks available to trigger automatic translations directly after creating duplicates. However, you can manually trigger or queue translations after duplication.
If these steps do not resolve your issue or if the solution seems outdated or irrelevant to your specific 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 further assistance is needed, please open a new support ticket at WPML support forum.
Problem: The client is redesigning a website and wants the English menu to display in its entirety for all languages without manually creating the menu in each language. This is to avoid updating 10+ menus every time a page is added to the English menu. Solution: Currently, WPML does not support automatic duplication of menus across different languages. The client has two options: 1. Manually duplicate the menus by going to Appearance > Menus, clicking on the "+" sign to add menus in secondary languages, and inserting the English links and labels. 2. Implement a custom code solution. The client can try editing the provided code to fit their context or consult with professional contractors for assistance. The code provided earlier should be added to the functions.php file, ensuring a backup is made first due to potential risks:
$locations_to_omit = ['header']; //Append menu locations here. e.g. ['primary', 'footer']<br />add_filter('wp_nav_menu_args', function ($args) use ($locations_to_omit) {<br /> if (isset($args['theme_location']) && in_array($args['theme_location'], $locations_to_omit)) {<br /> $current_lang = apply_filters( 'wpml_current_language', null );<br /> do_action('wpml_switch_language', apply_filters( 'wpml_default_language', null ));<br /> <br /> add_filter('wp_nav_menu', function ($nav_menu) use ($current_lang){<br /> do_action('wpml_switch_language', $current_lang);<br /> return $nav_menu;<br /> }, 99);<br /> }<br /> <br /> return $args;<br />}, 1);
If these solutions do not resolve the issue or if the solution becomes outdated, we 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 trying to translate strings in your theme, but two strings are not translating as expected. The issues identified include using a hook to register strings with variables instead of direct strings, and using a templating language with double curly braces instead of the standard PHP syntax. Solution: First, ensure that you are directly passing the strings that need translation into the function, rather than using variables. This will help WPML recognize and translate them correctly. Second, switch to using standard PHP syntax as per WordPress Coding Standards for better compatibility with WPML. We also recommend testing your theme on a WPML test site to closely examine these issues.
If this solution does not resolve your issue or seems outdated, please check the related known issues and confirm that you have installed the latest versions of themes and plugins. If the problem persists, we highly recommend opening a new support ticket for further assistance. You can do so here: WPML support forum.
Problem: You are experiencing issues with displaying translated taxonomy terms attached to a custom post type using the function
get_the_terms()
. The terms always appear in the default language, and the
$current_ID
variable returns nothing, which prevents displaying links to the translated taxonomy terms. Solution: First, ensure that your code functions correctly in the default language. If it does, the issue might be related to how the translations and taxonomy terms are set up in WPML. Here are the steps we recommend: 1. Verify that each post and its corresponding taxonomy terms are translated into the desired languages. 2. In the WPML settings, configure your custom post type (CPT) and taxonomy to be 'Translatable - only show translated items'. 3. Check if the issue persists using a default WordPress theme, as custom themes can sometimes cause conflicts. If these steps do not resolve the issue, it might be due to outdated methods or incompatibilities with your current setup. 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 the problem continues, please open a new support ticket with us for further assistance at WPML support forum.
Problem: Sie haben versucht, einen Buttontext für die String-Übersetzung zu erstellen und haben dazu Code in eine PHP-Datei eingefügt. Solution: Wir empfehlen in diesem spezifischen Fall die Verwendung der Funktion
Falls diese Lösung veraltet erscheint oder nicht auf Ihr Problem zutrifft, empfehlen wir Ihnen, ein neues Support-Ticket zu eröffnen. Wir empfehlen auch, die Seite mit bekannten Problemen (https://wpml.org/known-issues/) zu überprüfen, die Version der dauerhaften Lösung zu verifizieren und zu bestätigen, dass Sie die neuesten Versionen von Themes und Plugins installiert haben. Für weitere Unterstützung besuchen Sie bitte unser Support-Forum: https://wpml.org/de/forums/forum/support-in-german/
Problema: Hai dei template custom per ogni pagina del tuo sito, come page-chi-siamo.php, e quando queste vengono tradotte, devi creare nuovi template come page-about-us.php per visualizzare i contenuti tradotti. Soluzione: Per evitare di creare un nuovo template per ogni pagina tradotta, devi rendere i tuoi template traducibili e tradurli con WPML. Assicurati che i tuoi template utilizzino le chiamate GetText corrette per permettere la traduzione. Se il tema utilizza metodi non standard per richiamare i contenuti, potrebbe essere necessario consultare l'autore del tema per ulteriori chiarimenti.
Se questa soluzione non risolve il tuo problema o sembra non essere più attuale, ti consigliamo di verificare i problemi noti, controllare la versione della correzione permanente e confermare che hai installato le ultime versioni dei temi e dei plugin. In caso di ulteriori difficoltà, ti invitiamo a aprire un nuovo ticket di supporto.
Problem: The client was unable to translate the author link to point to the about page in the second language, translate sidebar category buttons, and set up a different newsletter pop-up for each language using Mailerlite. Solution: 1) For the author link, we recommended checking if the link is saved as a string that can be translated via WPML's String Translation. If not found, the client should follow the guide on finding strings that don't appear on the string translation page (documentation). Additionally, we provided a custom code solution to dynamically change the author link based on the current language using WPML functions:
2) For translating sidebar buttons, since they are part of a WordPress widget block, we directed the client to follow the steps in our guide on translating widgets (documentation). If the widgets are not appearing under Appearance > Widgets due to theme limitations, contacting the theme developer for assistance was recommended. 3) Regarding the Mailerlite pop-up, since WPML does not currently integrate with Mailerlite, we suggested manually creating separate pop-ups for each language or contacting the plugin author about potential integration with WPML.
If this solution does not resolve your issue or seems outdated, please check related known issues (here), verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. If further assistance is needed, we highly recommend opening a new support ticket at WPML support forum.
Problem: You are developing a bilingual site and have a custom post type called 'portfolio'. While the taxonomy names display correctly in French, they appear in French instead of English on the English page, despite having translations set in WPML. Solution: First, ensure that you have translated the taxonomy slug or label via WPML > String Translation. Use the filter hook
wpml_translate_single_string
to retrieve the translated string. Here's how you can implement it:
For more details, follow this documentation: https://wpml.org/wpml-hook/wpml_translate_single_string If you prefer using SQL queries, you can fetch the translated name directly from the database using the following query:
SELECT st.value AS translated_text
FROM wp_icl_strings s
JOIN wp_icl_string_translations st ON s.id = st.string_id
WHERE s.context = 'WordPress' -- string domain
AND s.value = 'category'
AND st.language = 'fr'
AND st.status = 10; -- completed status
Please test this on your staging site before applying it to your production site.
If this solution does not resolve your issue or seems outdated, we recommend opening a new support ticket. Also, check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum: WPML Support Forum.
Problema: Il cliente sta cercando di configurare domini diversi per ogni lingua utilizzando WPML. WordPress è installato in una sottocartella mentre il dominio principale utilizza Laraval. La configurazione dei domini desiderata è miodominio.com/blog e per ottenerla ha tentato di utilizzare un reverse proxy, ma sta riscontrando errori nel log del server nginx. Soluzione: Purtroppo, non possiamo fornire supporto diretto per questo problema specifico poiché la configurazione desiderata esula dalle funzionalità standard di WPML. Consigliamo di contattare uno dei contractor di WPML per assistenza specializzata.
Se questa soluzione non dovesse essere più rilevante, perché potrebbe essere datata o non applicabile al tuo caso, ti invitiamo a aprire un nuovo ticket di supporto. Ti consigliamo vivamente di consultare la pagina dei problemi noti, verificare la versione della correzione permanente e confermare di avere installato le ultime versioni dei temi e dei plugin. Per ulteriore assistenza, visita il forum di supporto WPML.