Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #263940

    I recently updated to the latest version of Enfold (2.7.1)

    My advanced layout editor is broken (Shows, but does nothing when pressed)

    Also, my previous site had a simple WPML language switcher that was reversed from the default. When in Spanish, the switcher would show “English”, and when in English, the switcher would say “Espanol”. I also did not show the flags, only the words “English” and “Espanol”

    Now that I have updated, for some reason the flags are showing, even though I have turned them off in the WPML options menu. I also forgot the code that I added to reverse the language switcher…

    Can someone help me with these problems please?

    Thank you!

    • This topic was modified 10 years, 6 months ago by miketran.
    #264529

    Hi miketran!

    Please update WPML to the latest version (3.1.5) and check if the update solves the issue(s).

    Regards,
    Peter

    #264563

    Thanks Peter…The update did fix the problem with the broken advanced editor button…I was hoping I could hide the flags that were showing up next to my social media icons by putting css code in the Enfold Quick CSS section…But that was not working, so I was forced to hide the flags by modifying the config-mod.css file instead…

    Now, I just need to reverse the language switcher so that the name of the language that is wanted is shown, instead of the current language…I had made the change before, but forgot what code I modified…Which brings me to the next question.

    Will a child theme allow me to make all of my php and css modifications without affecting the original files, or does only work with the css files?

    Thanks!

    #265854

    Hi!

    1) If you want to deactivate/hide the Enfold flags please insert this code into your child theme 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);
    }
    
    

    2) Did you try to contact the WPML support team – probably they can give you some code to change the order of the languages in the language switcher.

    3) Yes you can overwrite php code of the parent theme with the child theme however you can only overwrite complete functions or you need to use hooks (i.e see code above) to modify the output. I recommend to create a functions.php file in the child theme folder and to insert your custom php code into this file.

    Best regards,
    Peter

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.