Problem: The client is trying to translate customized fields using WPML but encounters an issue where the translations do not appear on the frontend. The client used a custom hook and registered labels to WPML, translating them successfully. However, despite following documentation and using code examples, the translations are not visible on the frontend. Solution: 1. Ensure the text domain is correct. According to WordPress documentation, the text domain must use dashes, be lowercase, and have no spaces. 2. When using variables in translated strings, use the
printf()
function instead of echoing the variable directly. For example, change:
<p id="popup-title"><?= $popuptitle ?></p>
to:
<p id="popup-title"><?php echo __('Subscribe Now, Save 10%', 'storefront') ?></p>
After making these changes, re-scan the strings in the child theme, translate the string, and check if the translation displays on the frontend. 3. If using a custom text domain like "popup", register it with the following function in your theme's
If this solution does not resolve your issue or 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.
Problem: You are experiencing an issue where WPML is not translating the WPBakery Page Builder templates correctly, and the translations are not appearing on the live website despite following the documentation at https://wpml.org/documentation/plugins-compatibility/how-to-build-multilingual-sites-with-wpbakery-page-builder-and-wpml/. Solution: 1. Ensure that you are using the WPML Translation Editor to translate your content. Post types such as pages, posts, and page builder content cannot be translated directly at WPML > String Translation. 2. Go to WPML > Settings > Post Type Translation and set the WPBakery Templates to "Translatable - only show translated items". 3. Translate the templates using the WPML Translation Editor, similar to how you would translate pages and posts. If this solution does not resolve your issue, or if it seems outdated or irrelevant 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. Additionally, you can open a new support ticket for further assistance at WPML support forum.
Problem: The client wants to change the URL structure to include the category slug, but only for the Norwegian language on their multilingual site. They are using WPML and currently have a different structure for Danish. Solution: We have determined that it is not possible to have different URL structures for each language when using WPML, as the content needs to be linked properly across languages. Additionally, attempting to force this change through code modifications is likely to cause issues and is not recommended.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your specific case, we encourage you to open a new support ticket. We also 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. For further assistance, please visit our support forum at https://wpml.org/forums/.
Problem: Wenn Sie einem neu hinzugefügten Admin-User oder einem User, der zuvor nur Redakteur war und nun Admin-Rechte erhalten hat, die vollen WPML-Zugriffs- und Bearbeitungsrechte geben möchten, aber feststellen, dass diese Rechte nicht automatisch zugewiesen werden. Solution: Eine mögliche Lösung ist die Installation eines Plugins zur Verwaltung von Nutzer-Berechtigungen, um dem Nutzer alle notwendigen Rechte hinzuzufügen. Ein empfohlenes kostenloses Plugin finden Sie hier: https://wordpress.org/plugins/user-role-editor/ Alternativ können Sie eine programmatische Lösung verwenden:
function add_wpml_capabilities_to_user($user_id) {
$user = get_user_by('ID', $user_id);
if ($user && $user->exists()) {
$wpml_capabilities = [
'wpml_manage_languages',
'wpml_manage_translation_options',
'wpml_manage_troubleshooting',
'wpml_manage_site_languages',
'wpml_manage_translations',
'wpml_manage_translation_management'
];
foreach ($wpml_capabilities as $capability) {
$user->add_cap($capability);
}
echo "WPML capabilities have been added to user ID $user_id.";
} else {
echo "User with ID $user_id does not exist.";
}
}
add_wpml_capabilities_to_user(123);
Ersetzen Sie '123' mit der tatsächlichen Benutzer-ID. Dieses Snippet sollte am Ende der functions.php Ihres Child Themes hinzugefügt und nach der Ausführung entfernt werden.
Falls diese Lösung veraltet ist oder nicht auf Ihr Problem zutrifft, empfehlen wir Ihnen, ein neues Support-Ticket zu öffnen. Überprüfen Sie auch die bekannten Probleme und stellen Sie sicher, dass Sie die neuesten Versionen Ihrer Themes und Plugins installiert haben.