Do you want switch dropdown language switcher into one line (English / Chinese / Russian) style, so here is the solution.
wp-content/themes/diwine/functions.php look for
function diwine_wpml_language_switcher($use_static = false, $part = 1, $wrap_end = false) { $output = ''; if(!$use_static) { if(function_exists("icl_get_languages") && function_exists("icl_disp_language") && defined("ICL_LANGUAGE_CODE") && defined("ICL_LANGUAGE_NAME")){ $languages = icl_get_languages('skip_missing=0&orderby=code'); if($part == 1) { $output .= '<div class="menu-lang">'; //wrapper start $output .= ' <span class="lang-switcher" title="'. esc_attr(ICL_LANGUAGE_NAME) .'"><span>'. ICL_LANGUAGE_NAME .'</span></span>'; $output .= $wrap_end ? '</div>' : ''; } if($part == 2) { $output .= ' <div class="lang-switcher-dropdown">'; if(!empty($languages)){ foreach($languages as $l){ if(ICL_LANGUAGE_CODE != $l['language_code']) { $output .= '<a href="' . esc_url($l['url']) . '" class="cca3" title="' . esc_attr($l['native_name']) . '">' . $l['native_name'] . '</a>'; } } } $output .= ' </div>'; $output .= $wrap_end ? '' : '</div>'; //wrapper end } } }else{ //if you don't want to use or don't have WPML plugin you can pass true to use_static parameter to build your own switcher if($part == 1) { $output .= '<div class="menu-lang">'; //wrapper start $output .= ' <span class="lang-switcher" title="English"><span>EN</span></span>'; $output .= $wrap_end ? '</div>' : ''; } if($part == 2) { $output .= ' <div class="lang-switcher-dropdown"> <a href="#" class="cca3" title="FR">FR</a> <a href="#" class="cca3" title="IT">IT</a> <a href="#" class="cca3" title="DE">DE</a> <a href="#" class="cca3" title="ES">ES</a> </div>'; $output .= $wrap_end ? '' : '</div>'; //wrapper end } } return $output; }
and replace with
function diwine_wpml_language_switcher($use_static = false, $part = 1, $wrap_end = false) { $output = ''; if(!$use_static) { if(function_exists("icl_get_languages") && function_exists("icl_disp_language") && defined("ICL_LANGUAGE_CODE") && defined("ICL_LANGUAGE_NAME")){ $languages = icl_get_languages('skip_missing=0&orderby=code'); if($part == 1) { $output .= '<div class="menu-lang">'; //wrapper start $output .= ' <span class="lang-switcher" title="'. esc_attr(ICL_LANGUAGE_NAME) .'"><span>'. ICL_LANGUAGE_NAME .'</span></span>'; if(!empty($languages)){ foreach($languages as $l){ if(ICL_LANGUAGE_CODE != $l['language_code']) { $output .= ' / <a href="' . esc_url($l['url']) . '" class="cca3" title="' . esc_attr($l['native_name']) . '">' . $l['native_name'] . '</a>'; } } } $output .= '</div>'; } } }else{ //if you don't want to use or don't have WPML plugin you can pass true to use_static parameter to build your own switcher if($part == 1) { $output .= '<div class="menu-lang">'; //wrapper start $output .= ' <span class="lang-switcher" title="English"><span>EN</span></span>'; $output .= $wrap_end ? '</div>' : ''; } if($part == 2) { $output .= ' <div class="lang-switcher-dropdown"> <a href="#" class="cca3" title="FR">FR</a> <a href="#" class="cca3" title="IT">IT</a> <a href="#" class="cca3" title="DE">DE</a> <a href="#" class="cca3" title="ES">ES</a> </div>'; $output .= $wrap_end ? '' : '</div>'; //wrapper end } } return $output; }
and add CSS below to your customizer or end of style.css file.
.menu-top-section>.menu-top-section_right .lang-switcher { font-size: inherit; }
Enjoy!