Problem: You are trying to translate a product using WPML, but the translation process is stuck and continuously shows as 'in progress'. Solution: We found that the issue was due to a specific shortcode:
For more details on how to register shortcodes, please check this guide. After registering the shortcode, please resend the products for translation and check if they translate correctly.
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 the issue persists, please open a new support ticket.
Problem: The client needed to reinstate the language option next to the search icon on their website. During the translation process, the entire header was deleted, and although the flags were restored, they were incorrectly positioned and styled. Solution: We recommended the client to ensure they have a backup of their site, which can be done using the UpdraftPlus plugin. After confirming the backup, we provided custom CSS to correct the positioning and styling of the language switcher. Here is the CSS code we used:
.sitepress_container > .wpml-ls ul ul li a:hover::after {
background-color: transparent!important;
}
}
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. If further assistance is needed, please open a new support ticket at WPML support forum.
Problem: The client is working on a site under development and wants to customize the WPML currency switcher by removing the border and adding country flags to the currencies. Solution: To remove the border from the currency switcher, the client should insert the following custom CSS code into WP > Appearance > Customize > Additional CSS:
.wcml-dropdown li {
border: 0px solid!important;
}
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 at our support forum.
Problem: The client is experiencing issues with author pages redirecting to the homepage instead of displaying the correct author page in various languages. This occurs when there are no posts available in the requested language.
Solution: This is the theme-specific issue that was not replicable on a new test site. We recommend using a custom code snippet to modify the behavior of the WPML language switcher on author pages. This code ensures that the language switcher links directly to the author pages, even if there are no posts in that language, thus preventing redirection to the homepage.
add_filter( 'icl_ls_languages', 'wpml_author_switcher_fix', 10, 1 );
function wpml_author_switcher_fix( $languages ) {
if ( is_author() ) {
$author = get_queried_object();
$author_slug = $author->user_nicename;
$default_lang = apply_filters( 'wpml_default_language', null );
foreach ( $languages as $lang_code => &$lang ) {
if ( $lang_code === $default_lang ) {
// No language prefix for default language
$lang['url'] = '/author/' . $author_slug . '/';
} else {
$lang['url'] = '/' . $lang_code . '/author/' . $author_slug . '/';
}
}
}
return $languages;
}
Please note that 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 the issue persists, please open a new support ticket at WPML support forum.