Hi, I have a custom field to insert an special image in products (woocommerce) , i use WPML for translation. This image should be the same for every languages, i tried to copy the acf group and field in all langages without any success. Maybe i should just retrieve the main langage info in the template ? i have this code:
<div id=”bandeau-produit” class=”mx-0 mb-3″ style=”background-image:url(<?php echo get_field(‘bandeau_image’) ?>)”>
is there a way to retrieve the french version whatever the langage ?
Thanks.
This could help: https://support.advancedcustomfields.com/forums/topic/wpml-get-field-from-options-from-specific-all-languages/#post-82538
If not: if French is the default language, you could try modifying the example from this comment to work with page-level fields instead of global options, and rename it from get_global_option() to get_french_field() or something to that effect. If French isn’t the default language, you’d probably just need to modify the output of cl_acf_set_language().