Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Andreas W. 1 year, 7 months ago.

Assisted by: Andreas W..

Author Posts
October 6, 2023 at 3:42 pm #14530139

benediktS-9

How can I can make custom php code with flags only?

I put this function in header:

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>';

And I get text switcher
How can I make flags instead of text: "English / Deutsch (German)"

October 6, 2023 at 10:48 pm #14531677

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

You can customize the Custom Language Switcher at WPML > Languages > Custom Language Switcher.

Disable the option for languages to display and it will only show flags.

Guide:
https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/

Best regards
Andreas

The topic ‘[Closed] How can I can make custom php code with flags only?’ is closed to new replies.