diff --git a/single-artisans.php b/single-artisans.php index 1ed28ee..0f5be7e 100644 --- a/single-artisans.php +++ b/single-artisans.php @@ -141,7 +141,7 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null; ) ) ); - $chantiers = new WP_Query($args); + $chantiers = new WP_Query($args); ?> posts): ?>
@@ -155,7 +155,13 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null; $localisation = get_field('localisation', $chantier->ID) ?? null; $city = $localisation['city'] ?? null; - $pictures = get_field('pictures', $chantier->ID); + //########## FORCE GET_FIELD IN FR TO BE SURE WE HAVE SAME PICTURES BETWEEN FR AND NL ########## + $chantier_fr_id = apply_filters('wpml_object_id', $chantier->ID, 'chantiers', TRUE, 'fr'); + $current_lang = apply_filters('wpml_current_language', NULL); + do_action('wpml_switch_language', 'fr'); + $pictures = get_field('pictures', $chantier_fr_id); + do_action('wpml_switch_language', $current_lang); + $chantier_name = get_field('chantier_name', $chantier->ID); ?>
@@ -182,7 +188,6 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
-