wpml add a floating language switcher to the footer

Solutions on MaxInterview for wpml add a floating language switcher to the footer by the best coders in the world

showing results for - "wpml add a floating language switcher to the footer"
Alonso
06 Mar 2017
1//WPML - Add a floating language switcher to the footer
2 add_action('wp_footer', 'wpml_floating_language_switcher'); 
3  
4 function wpml_floating_language_switcher() { 
5    echo '<div class="wpml-floating-language-switcher">';
6        //PHP action to display the language switcher (see https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/#using-php-actions)
7        do_action('wpml_add_language_selector');
8    echo '</div>'; 
9}
10