Answers for "WPML - Add a floating language switcher to the footer"

PHP
0

WPML - Add a floating language switcher to the footer

//WPML - Add a floating language switcher to the footer
 add_action('wp_footer', 'wpml_floating_language_switcher'); 
  
 function wpml_floating_language_switcher() { 
    echo '<div class="wpml-floating-language-switcher">';
        //PHP action to display the language switcher (see https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/#using-php-actions)
        do_action('wpml_add_language_selector');
    echo '</div>'; 
}
Posted by: Guest on May-20-2021

Browse Popular Code Answers by Language