We have altogether three languages. German language is not translated with the plugin Polylang, it is a separate site.
How can I have this language (site) appearing inside the language selector that it looks equal to the other languages but is linked to an other site (other server)
i have this code from WPML support forum that i think it would work but it needs a little modification…can you please help me and modify so it would work with enfold and polylang
add_filter(‘wp_nav_menu_items’, ‘new_nav_menu_items’, 10, 2);
function new_nav_menu_items($items, $args) {
if (function_exists(‘icl_get_languages’)) {
$items = “”;
$languages = icl_get_languages(‘skip_missing=0’);
if(1 < count($languages)){
foreach($languages as $l){
if( $l[‘language_code’] == ‘de’ ) { //if the external language is de.
$items = $items.'<span class=”menu-item-‘.$l[‘language_code’].'”> ‘ . ‘</span> ‘;
}
else {
$items = $items.'<span class=”menu-item-‘.$l[‘language_code’].'”> ‘ . ‘</span> ‘;
}
}
}
return $items;
}
}
Hey Uroš,
Could you please add this code using the code button, so that it gets pasted correctly and
could you please give us a link to your website, we need more context to be able to help you.
Best regards,
Victoria
i work around and solve problem with another method…thank you anyway