-
AuthorPosts
-
January 23, 2024 at 10:17 am #1431770
Hi,
The flag of languages not appear in phone burger menu.
Could yo help me?
Thanks advance,BR,
Antonio.
January 25, 2024 at 7:55 am #1431967Hey Antonio,
Thank you for the inquiry.
The language flags should be displayed inside the burger menu overlay, positioned below the burger menu items. Please open the burger menu, and you should find the language flags within the menu overlay.
Best regards,
IsmaelJanuary 26, 2024 at 1:27 pm #1432131Hi Ismael,
In computer if I reduce the window and upper the burgher I can see the Social network and the flags inside the menu.
But in the mobile the flag and social network are not there.
Thanks advance,BR,
Antonio.
January 27, 2024 at 9:08 am #1432188January 29, 2024 at 11:25 am #1432364Hi Guenni,
No its a Polylang.
Here I send you a screenshot from mobile and computer.
Thanks advance,BR,
Antonio.
January 31, 2024 at 9:04 am #1432571Hi,
Thank you for the screenshots.
The language flags are visible on desktop view but the value of src attribute gets replaced on mobile view for some reason. Please provide the login details in the private field so that we can check the issue further. You can also use this code in the functions.php file to append the default language switcher beside the burger menu.
add_action( 'ava_after_main_menu', 'wpml_switch_to_header' ); function wpml_switch_to_header() { if(!wp_is_mobile()) return echo do_action('wpml_add_language_selector'); }
Best regards,
IsmaelJanuary 31, 2024 at 10:00 am #1432577This reply has been marked as private.February 2, 2024 at 7:52 am #1432795Hi,
Thank you for the info.
We just noticed that the site still contains a very old version of the theme. Please upgrade the theme from 5.1.2 to the latest version, 5.6.10. After the upgrade, please make sure to toggle or temporarily disable the Enfold > Performance > File Compression settings and purge the cache. Let us know if the upgrade helped fix the issue.
Best regards,
IsmaelJuly 12, 2024 at 11:21 am #1461914Hi Ismael,
I updated the theme, disable file compression and purge the cache but the flags not appearing
Could you help me?
Thanks advance,BR,
Antonio.
July 13, 2024 at 7:36 am #1461959You have installed WPML now, haven’t you?
because: https://kriesi.at/support/topic/the-flag-of-languages-not-appear-in-phone-burger-menu/#post-1432364July 13, 2024 at 10:25 am #1461960Hi Guenni,
No have not installed WPML I have install Polylang.
Thanks!July 13, 2024 at 3:01 pm #1461970Hi,
It looks like the flags are in the mobile menu, but your caching plugin has made them “lazy loaded” so they won’t show. I couldn’t find the lazy load option in your caching plugin, but I have not used that one before. Typically you can add classes to disable the lazyload so try adding lang-item to the setting. If this doesn’t help try disabling the caching plugin completely and see if the corrects, if not leave the caching plugin disabled and we will check again.Best regards,
MikeJuly 14, 2024 at 9:10 am #1462002besides that : this is the shortcode for polylang lang switch:
function custom_polylang_langswitcher() { $output = ''; if ( function_exists( 'pll_the_languages' ) ) { $args = [ 'show_flags' => 1, 'hide_if_empty' => 0, 'show_names' => 1, 'echo' => 0, ]; $output = '<ul class="polylang_langswitcher">'.pll_the_languages( $args ). '</ul>'; } return $output; } add_shortcode( 'polylang_langswitcher', 'custom_polylang_langswitcher' );
there are a lot of args you can use to manage the way it looks like:
/** * @param array $args { * Optional array of arguments. * * @type int $dropdown The list is displayed as dropdown if set, defaults to 0. * @type int $echo Echoes the list if set to 1, defaults to 1. * @type int $hide_if_empty Hides languages with no posts ( or pages ) if set to 1, defaults to 1. * @type int $show_flags Displays flags if set to 1, defaults to 0. * @type int $show_names Shows language names if set to 1, defaults to 1. * @type string $display_names_as Whether to display the language name or its slug, valid options are 'slug' and 'name', defaults to name. * @type int $force_home Will always link to home in translated language if set to 1, defaults to 0. * @type int $hide_if_no_translation Hides the link if there is no translation if set to 1, defaults to 0. * @type int $hide_current Hides the current language if set to 1, defaults to 0. * @type int $post_id Returns links to the translations of the post defined by post_id if set, defaults not set. * @type int $raw Return a raw array instead of html markup if set to 1, defaults to 0. * @type string $item_spacing Whether to preserve or discard whitespace between list items, valid options are 'preserve' and 'discard', defaults to 'preserve'. * @type int $admin_render Allows to force the current language code in an admin context if set, default to 0. Need to set the admin_current_lang argument below. * @type string $admin_current_lang The current language code in an admin context. Need to set the admin_render to 1, defaults not set. * @type string[] $classes A list of CSS classes to set to each elements outputted. * @type string[] $link_classes A list of CSS classes to set to each link outputted. * } */
some quick css:
.lang-item { display:inline; padding-left:5px; list-style:none; }
July 30, 2024 at 5:29 pm #1463354Hi Mike and Jenni,
Finally was a total cache fail. I changed the cache plugin to Lite Speed and works perfect.
Many thanks,BR,
Antonio.
July 31, 2024 at 1:14 am #1463386Hi,
Glad to hear that you have this sorted out, if you have any further questions please open a new thread and we will be happy to help.Best regards,
Mike -
AuthorPosts
- The topic ‘The flag of languages not appear in phone burger menu.’ is closed to new replies.