Home Forums ACF PRO Get_field specific langage


Get_field specific langage

  • 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 ?


  • This could help:

    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().

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Get_field specific langage’ is closed to new replies.