Viewing 23 posts - 1 through 23 (of 23 total)
  • Author
    Posts
  • #1144452

    Hi,

    I want to remove the Enfold’s language switcher from the top bar. I’ve added this to functions.php file :

    add_action(‘after_setup_theme’,’avia_remove_main_menu_flags’);
    function avia_remove_main_menu_flags(){
    remove_filter( ‘wp_nav_menu_items’, ‘avia_append_lang_flags’, 20, 2 );
    remove_filter( ‘avf_fallback_menu_items’, ‘avia_append_lang_flags’, 20, 2 );
    remove_action( ‘avia_meta_header’, ‘avia_wpml_language_switch’, 10);
    }

    Now the switcher in the top bar is gone, but it appears in the main menu…

    How can I remove this switcher completely please ?

    Best regards,

    Stephanie

    #1144519

    Hey lupistella,

    Add this as well to quick css:

    .avia_wpml_language_switch.avia_wpml_language_switch_extra{
        display:none!important
    }

    Best regards,
    Jordan Shannon

    #1144522

    Sorry it doesn’t work, the switcher is still in the main menu

    #1144543

    Hi,

    Did you add the code to the very top of quick css so it runs first? Also, clear the cache a few times over.

    Best regards,
    Jordan Shannon

    #1144548

    I’ve removed the code I put in functions.php and it now works, thanks !

    Another quick question if you don’t mind. I’ve added WPML’s switcher. It’s a dropdown list, but the dropdown arrow doesn’t show. WPML’s support said it doesn’t come from them but from the theme. I’ve switched to Twenty Seventeen theme and the arrow appears with no problem. So it definetly comes from Enfold. Any idea why ? Could it be an incompatibility with the font ?

    #1145597

    Hi,

    Thank you for the update.

    How did you enable the switcher exactly? You may need to add the default language switcher from WPML by using this snippet in the functions.php file.

    add_action('avia_meta_header', 'ava_icl_language_selector');
    function ava_icl_language_selector(){
    	do_action('icl_language_selector');
    }
    

    Best regards,
    Ismael

    #1145726

    Hi Ismael,
    I’ve enable the switcher through WPML settings (WPML > Languages > Menu language switcher).
    I’ve tried your snippet. It messes up the language switcher and doesn’t add the arrow.
    Regards,
    Stephanie

    #1146399

    Hi,

    Thank you for the update.

    Can we access the site? Please post the login details in the private field, and make sure that the Appearance > Editor panel is accessible.

    Best regards,
    Ismael

    #1146781
    This reply has been marked as private.
    #1147045

    Hi,

    Thank you for the update.

    The password for the username seems to be invalid. We also tried it without the hashtag at the beginning, but it still doesn’t work. And we got locked out of the site because we used it multiple times. Please check the info carefully. (see private field)

    ERROR: Access from your IP address has been blocked for security reasons. Please contact the administrator.

    Best regards,
    Ismael

    #1147882

    Hi Ismael,
    This is weird. Please see below new login details.

    #1148313

    Hi,

    Thank you for the update.

    We can now access the dashboard, and so we added the following css code to bring back the dropdown arrow in the language switcher.

    #avia2-menu > li::after {
        font-family: 'dashicons';
        content: "\f140";
    }
    

    Best regards,
    Ismael

    #1148351

    Hi Ismael,
    Thanks, but the result isn’t right :
    – on Explorer : still no arrow
    – on Chrome : no arrow + an extra horizontal switcher (just flags)
    – on mobile : no arrow but a sort of round instead

    Best regards,
    Stephanie

    #1148745

    Hi,

    Thank you for the update.

    The icon font or the arrow displays fine on the developer version of Firefox. Do you have access to the .htaccess file? Adding this configuration should help fix the issue for other browsers.

    <FilesMatch "\.(eot|otf|woff|ttf)$">
      SetEnvIf Origin »
        "^http(s)?://(.+\.)?(domain1\.org|domain\.com)$" origin_is=$0
      Header set Access-Control-Allow-Origin %{origin_is}e env=origin_is
    </FilesMatch>
    

    Let us know how it goes.

    Best regards,
    Ismael

    #1149597

    Hi Ismael,
    No, the arrow is not displayed correctly on Firefox either (it displays a square with little signs in it).
    I’ve tried to add your code at the end of the .htaccess file, but it produced an error (the website became unaccessible).
    Any solution please ?
    Best regards,
    Stephanie

    #1150365

    Hi,

    Thank you for the update.

    Did you copy the code from your email? Please copy it directly from the forum and make sure that the “domain1” and “domain” is replaced with the actual name of the site. Or post the FTP login details to the server so that we can edit the files when necessary.

    Best regards,
    Ismael

    #1150950

    Hi Ismael,
    I couldn’t make it work, I’m sorry.
    Please see below my FTP credentials.
    Best regards,
    Stephanie

    #1152278

    Hi,

    Thank you for the update.

    We replace the previous code with the following css modification. It replaces the icon font with an arrow-down symbol using css.

    #avia2-menu > li::after {
    	content: "";
    	width: 0;
    	height: 0;
    	border-left: 3px solid transparent;
    	border-right: 3px solid transparent;
    	border-top: 3px solid #404040;
    	top: 10px;
    	position: relative;
    	left: 5px;
    }

    Best regards,
    Ismael

    #1152561

    That’s great, thanks !!

    #1152563

    Hi,

    Did you need additional help on this topic?

    Best regards,
    Jordan Shannon

    #1152564
    This reply has been marked as private.
    #1152565

    No it’s ok, thanks !

    #1152574

    Hi,

    If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 23 posts - 1 through 23 (of 23 total)
  • The topic ‘Remove language switcher’ is closed to new replies.