Support

Account

Home Forums General Issues How to display default language Options field, when no WPML translation exists Reply To: How to display default language Options field, when no WPML translation exists

  • Hi @infoamitywebsolutions-co-uk

    Please keep in mind that the_sub_field() will echo the value automatically, so you don’t have to use echo anymore.

    Also, the best thing to do in this kind of situation would be creating a script that will copy the values from the master site to the translated page. You can list the fields name you use for the options page, loop through it and update the translated site like this:

    $options_field_names = array('field_name_1','field_name_2', 'field_name_3');
    
    foreach( $options_field_names as $options_field_name ){
        $master_value = get_field($options_field_name, 'options', false);
        update_field($options_field_name, $master_value, 'options_de_');
    }

    I hope this helps 🙂