Tagged: child theme, config, wpml
-
AuthorPosts
-
May 28, 2018 at 9:09 pm #963435
Hi,
Where in my child theme should I put config-wpml/config.php, when I want to customize it? (The intuitive answer “enfold-child/config-wpml/config.php” doesn’t have any effect).
May 31, 2018 at 6:04 am #964628Hey HAJ-MBJ,
Thank you for using Enfold.
It’s not a template file so you can’t override it by copying the file in the child theme. What specific modification are you trying to make?
Best regards,
IsmaelMay 31, 2018 at 8:55 am #964671Hi Ismael,
Thanks for the quick reply!
I need language codes (like EN, DE, ES etc.) instead of flags in the Enfold Language Switcher. It is easily done with modifications directly in config-wpml/config.php, but I guess it is not the right approach then?
Best regards,
Henrik- This reply was modified 6 years, 5 months ago by HAJ-MBJ.
May 31, 2018 at 2:21 pm #964786June 1, 2018 at 12:34 pm #965264Hi,
Thanks for the update.
@HAJ-MBJ: You don’t need PHP modifications to accomplish that. Please try this css code instead..avia_wpml_language_switch li .language_flag img { display: none; } .avia_wpml_language_switch li .language_code { display: block; text-transform: uppercase; }
The language info are already included in the language container but they’re hidden by default.
Best regards,
IsmaelJune 1, 2018 at 12:49 pm #965273Hi Ismael,
you did it, :)
for my part it is working out fine.
thanks a lot!
regards from munich,
paulJune 2, 2018 at 8:01 am #965725Hi Paul,
Great, glad we could help. Please let us know if you should need any further help on the topic.
Best regards,
RikardJune 4, 2018 at 8:49 am #966367Hi,
The solution doesn’t work for me. I can’t recognize the class “avia_wpml_language_switch” – and the vertical menu like switcher, that I use, does not include language codes in the HTML.
It looks like this:
<li class='av-language-switch-item language_en > <a href='/en/'> <span class='language_flag'><img src='flag_EN.svg' /></span> </a> </li>
Best regards,
Henrik- This reply was modified 6 years, 5 months ago by HAJ-MBJ.
June 5, 2018 at 8:21 pm #967441Hi Henrik,
Could you please give us a link to your website, we need more context to be able to help you.
Best regards,
VictoriaJune 5, 2018 at 8:42 pm #967464This reply has been marked as private.June 8, 2018 at 12:50 am #969881Hi,
Thanks for the update.
Looks like you managed to display the language code instead of the flags. :)
Best regards,
IsmaelJune 8, 2018 at 9:04 am #970014Hi Ismael,
Yes – but in reference to my initial question: How can I accomplish this in a way, that won’t get overwritten in a theme update? (The present solution is based on editing directly in config-wpml/config.php, and I don’t know how to move the modification to child-theme).
Best regards,
HenrikJune 12, 2018 at 2:53 am #971477Hi,
How did you modify the W P M L config file? Did you try the css code without that particular modification?
Best regards,
IsmaelJune 12, 2018 at 7:54 am #971562Hi,
I basically just replaced the img-tags (flags) with
$lang['language_code']
.Yes – I did try the CSS code on the original HTML, without any modifications. But the original HTML does not include the CSS classes you are referring to in the provided CSS modification.
Best regards,
HenrikJune 13, 2018 at 3:31 am #972008Hi,
Thanks for the update.
I see. Please copy the “avia_append_lang_flags” function without the function_exists check in your child theme’s functions.php file. That should override the default function.
Best regards,
IsmaelJune 26, 2018 at 2:54 pm #977962It works! Thank you very much!
Best regards,
HenrikJune 26, 2018 at 6:59 pm #978082Hi Henrik,
Glad you got it working for you! :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.