Problem: The client is using a custom function to add menu items to a WordPress menu based on user login status. However, when adding the WPML language switcher, the custom menu items appear after the language switcher instead of before it. Solution: We recommend modifying the function to ensure that the custom menu items appear before the WPML language switcher. You can use the following code:
add_filter('wp_nav_menu_items', 'add_custom_menu_items_before_wpml', 10, 2);<br />function add_custom_menu_items_before_wpml($items, $args) {<br /> // Your new menu item(s)<br /> if (is_user_logged_in()) {<br /> $custom_items = '<li><a href="' . esc_html_x('/conta/', 'Botão no menu de navegação URL', 'lwp') . '">' . esc_html_x('Conta ', 'Botão no menu de navegação', 'lwp') . '</a> </li>';<br /> $custom_items .= '<li><a href="' . wp_logout_url() . '">' . esc_html_x('Sair ', 'Botão no menu de navegação', 'lwp') . '</a> </li>';<br /> } else {<br /> $custom_items = '<li><a href="' . wp_registration_url() . '">' . esc_html_x('Registar ', 'Botão no menu de navegação', 'lwp') . '</a> </li>';<br /> $custom_items .= '<li><a href="' . esc_html_x('/conta/', 'Botão no menu de navegação URL', 'lwp') . '">' . esc_html_x('Entrar ', 'Botão no menu de navegação', 'lwp') . '</a> </li>';<br /> }<br /> // Find the WPML language switcher and insert before it<br /> $pattern = '/(<li[^>]*class="[^"]*menu-item-wpml-ls[^"]*"[^>]*>)/i';<br /> if (preg_match($pattern, $items, $matches)) {<br /> $items = preg_replace($pattern, $custom_items + $matches[1], $items, 1);<br /> } else {<br /> // Fallback if language switcher not found — append instead<br /> $items += $custom_items;<br /> }<br /> return $items;<br />}
This solution might be outdated or not applicable 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 this does not resolve your issue, please open a new support ticket at WPML support forum.
Problem: You are trying to translate a modal box on a global CTA bar using WPML. The Gravity Form is translated, but the title of the modal box and the close button are not appearing in the translation strings. The title uses the dynamic title of Avada, which is similar to the container text and is translatable. Solution: To make the title of the modal box translatable, we added a custom XML configuration. Please add the following code to your WPML settings:
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 further assistance is needed, please open a new support ticket at https://wpml.org/forums/forum/english-support/.
Falls diese Lösung für Sie nicht relevant ist, weil sie veraltet ist oder nicht auf Ihren Fall 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.
Problem: The client attempted to use a code snippet from a WPML forum post to exclude the product title from automatic translation for testing purposes, but it did not work. The client actually wants to exclude only the main product description from automatic translation while keeping the title and short description translatable. Solution: We explained that the provided code was a basic example and needs adaptation to meet specific requirements. Since the client wants to modify WPML’s default behavior, which is complex, we recommended consulting with a certified WPML contractor for tailored assistance. A list of certified freelancers can be found at https://wpml.org/contractors/.
If this solution does not apply to your case, or if it seems outdated, please check the 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. We highly recommend opening a new support ticket if further assistance is needed. You can do so at WPML support forum.
Problem: The client wants to configure WPML to use different domains for different languages and add a custom NGINX rule so that when users visit specific URLs (like fishingbooker.de/blog), they are redirected to the corresponding language version on the main site (fishingbooker.com/blog). Solution: We recommend using an NGINX reverse proxy to route traffic from each language-specific domain to the appropriate language directory on the main WordPress installation. Here is an example of how you can set up the NGINX reverse proxy:
Please ensure SSL, cookies, and caching are properly managed, as these are crucial for WordPress and WPML functionality. Note that this solution is not a WPML-native feature and falls outside our standard support. If you need further assistance with server configuration, consider contacting a certified WPML developer from our list of contractors.
This solution might be outdated or not applicable to your specific case. If it doesn't resolve your issue, 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 our support forum.
Problem: You are trying to synchronize products from an ERP system to your WordPress website and want to add English translations simultaneously to avoid manual translation later. Solution: We recommend using the WordPress REST API in conjunction with WooCommerce Multilingual to automate the process of creating both the original product and its translation. You can find more details on how to implement this here. Please note, this type of custom integration is outside our standard support scope. If you need further assistance, consider reaching out to a WPML-certified developer here.
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. Should you need further assistance, please do not hesitate to open a new support ticket here.
Problem: Der Klient hat Inhalte ursprünglich auf Deutsch erstellt und später WPML verwendet, um die Website auf Englisch zu übersetzen. Nach der Umstellung der Originalsprache auf Englisch wurden die bereits erstellten deutschen Inhalte fälschlicherweise als Originalinhalte betrachtet. Der Klient möchte wissen, wie er die Zuordnung von Bildern, Tags und anderen Elementen zur richtigen Sprache korrigieren kann, sodass alle Elemente als Originalsprache Englisch sind. Solution: Wir haben erklärt, dass die Standardsprache von WPML keinen Einfluss auf die Sprache hat, in der die originalen Inhalte erstellt wurden. Um die Zuordnung manuell zu korrigieren, sollte der Klient eine Übersetzung im WordPress Editor öffnen und in der rechten Seitenleiste den Eintrag "This is a translation of:" auf "None" setzen und die Seite speichern. Dadurch wird die Übersetzung nicht mehr mit dem originalen Inhalt verbunden. Anschließend kann der Klient die Option "Connect with translations" verwenden, um den Inhalt mit einem anderen Inhalt in einer anderen Sprache zu verbinden. Ein Dialog wird erscheinen, in welchem festgelegt werden kann, welcher Inhalt nun der neue originale Inhalt sein soll. Mehr Informationen finden Sie unter: https://wpml.org/faq/how-to-link-already-translated-pages/
Falls diese Lösung veraltet ist oder nicht auf Ihren Fall 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.
Problem: The client is attempting to save custom field data for a WooCommerce variable product using the WPML plugin. They have added custom price fields but encounter an issue where the product page reloads and displays nothing after saving the variable custom field data. Solution: We clarified that the 'wcml_product_custom_prices' filter is intended for currency conversion, not for language translation or updating postmeta on translated products. To handle custom fields correctly across different languages, the client should ensure that they are using the WPML object ID filter to get the correct product ID for each language. This approach helps in storing custom field values separately for each language. If the client is not planning to use different prices per language but wants to enable translation of the custom field, they should: 1. Add the custom field for each product (_purchase_cost). 2. Enable the translation of that custom field per language via WPML. 3. Store the custom field values separately for each language, ensuring that the values are saved correctly when the product is edited in different languages. For further assistance, 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 the problem persists, please open a new support ticket at https://wpml.org/forums/forum/english-support/.
Problem: You are trying to translate a string from Hebrew to English using the
wpml_translate_single_string
hook in WPML, but it fails to translate into the website's default language (English), while it successfully translates into Russian. Solution: The
wpml_translate_single_string
hook does not translate into the default language because WPML assumes the string in the default language is the original value and does not store translations for it. To retrieve a translation based on the current language, use the default language string as the source and pass the current language as the target:
This method uses the default language string ('Subject en') as the source, and WPML looks up the appropriate translation for the current language. For further understanding, you might find these guides helpful:
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 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. For further assistance, please visit our support forum: WPML Support Forum.
Problem: The client was facing an issue where translated posts set to draft were still appearing in the frontend category listing. Despite using WPML's troubleshooting options like 'Synchronize post taxonomies' and 'Fix post type assignment', the draft posts remained visible. Solution: The client discovered that the issue was related to the custom category.php file not filtering out posts based on their draft status and language settings. By debugging the category.php template, it was found that posts in one language were displaying in another language's listing even if they didn't exist in that language on the backend. The client resolved this by setting a filter/condition in the category.php to only display posts in their respective languages.
If you're experiencing a similar issue, we recommend checking your theme's category.php file for proper filtering of post statuses and languages. Additionally, ensure that your WPML plugins are up to date by visiting WPML Downloads.
Please note that 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 the issue persists, please open a new support ticket at WPML Support Forum.
Problem: The client has a multisite WordPress installation and wants all the subsites to share the same WPML tables instead of having their own per-site prefixes. They are looking for a way to configure WPML to share the same tables across all subsites and inquire if there is a setting to force a specific prefix. Solution: We explained that sharing WPML tables across all subsites in a multisite installation is not possible with the current setup of WordPress and WPML. This would require significant custom adjustments both to WPML and WordPress itself. For such custom coding, we recommend consulting with WPML contractors who are familiar with WPML's inner workings. You can find a list of contractors here: https://wpml.org/contractors/
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 you still need assistance, please open a new support ticket at WPML support forum.
Problem: The client's website footer translated into Spanish displays incorrect styling compared to the German and Dutch versions. Solution: We recommend adding the following custom CSS to address the styling issues in the Spanish footer. Navigate to WP > Appearance > Customize > Additional CSS and insert:
This solution might not be relevant 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 the issue persists, please open a new support ticket at WPML support forum.