Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Show default version if translation isn't found
add_filter('icl_ls_languages', 'wpml_ls_filter');
function wpml_ls_filter($languages) {
global $sitepress;
$default_url = $languages[$sitepress->get_default_language()]['url'];
foreach($languages as $lang_code => $language){
$languages[$lang_code]['url'] = $default_url;
return $languages;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.