Hello,
Please advise how I can remove flags from the WPML header?
I was able to use this CSS Code but it only remove the flags from the drop-down optionselection.
#header-languages img {
display: none !important;
}
What do I need to change from the SF-THEME-FUNCTIONS.PHP?
/* LANGUAGE FLAGS
================================================== */
function sf_language_flags() {
$language_output = "";
if (function_exists('icl_get_languages')) {
$languages = icl_get_languages('skip_missing=0&orderby=code');
if(!empty($languages)){
foreach($languages as $l){
$language_output .= '<li>';
if($l['country_flag_url']){
if(!$l['active']) {
$language_output .= '<a href="'.$l['url'].'"><img src="'.$l['country_flag_url'].'" height="12" alt="'.$l['language_code'].'" width="18" /><span class="language name">'.$l['translated_name'].'</span></a>'."\n";
} else {
$language_output .= '<div class="current-language"><img src="'.$l['country_flag_url'].'" height="12" alt="'.$l['language_code'].'" width="18" /><span class="language name">'.$l['translated_name'].'</span></div>'."\n";
}
}
$language_output .= '</li>';
}
}
} else {
//echo '<li><div>No languages set.</div></li>';
$flags_url = get_template_directory_uri() . '/images/flags';
$language_output .= '<li><div class="current-language"><span class="language name">Translation - Under Construction</span></div></li><li><a href="#"><span class="language name">French</span></a></li><li><a href="#"><span class="language name">English</span></a></li>'."\n";
}
return $language_output;
}
Appreciate your support.
Thanks Antonio