Hello, I had the same issue before. After the update I am still facing the same problem.
There was no problem before but after tema updating the codes are not working. I tried them both in appearence>additional css and wpml>languages but the result is same. I don't see the floating switcher on my site. I get an error when I add the following code to the functions.php file. If you tell me how you solved the problem or what the error is, I will not open a ticket again and bother you. Thank you.
//WPML - Add a floating language switcher to the footer
add_action('wp_footer', 'wpml_floating_language_switcher');
I have used admin access from another ticket you have and checked your website.
Seems all is working well, maybe you have pasted wrong code.
I have added the next code to your functions.php:
//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>';
}
Then added CSS to custome CSS:
/*Customize this if you want*/
.wpml-floating-language-switcher {
position: fixed;
bottom: 10px;
right: 10px;
background: #f8f8f8; /*background color*/
border: 1px solid; /*border settings*/
border-color: #eee; /*color of the border*/
padding: 0px; /*padding of container*/
border-radius: 6px; /*rounded border*/
/*Box Shadow*/
-webkit-box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.25);
-moz-box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.25);
box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.25);
}
Regards,
Drazen
The topic ‘[Closed] Floating Language Switcher's css codes are not working.’ is closed to new replies.