diff --git a/template-archive-conseils.php b/template-archive-conseils.php index 77a5718..248ab59 100644 --- a/template-archive-conseils.php +++ b/template-archive-conseils.php @@ -37,11 +37,7 @@ $page_icon = get_field('page_icon', get_queried_object()); || $thematique->slug === "au-quotidien" || $thematique->slug === "dagelijks" ) continue; - - // $thematique_icon = get_field('taxonomy_pictures', $thematique->term_id)['icon']; - // $translated_term_id = icl_object_id($thematique->term_id, $thematique->taxonomy, true, ICL_LANGUAGE_CODE); - // $thematique_icon = get_field('taxonomy_pictures', $thematique->taxonomy . '_' . $translated_term_id)['icon']; - + $original_term_ID = apply_filters('wpml_object_id', $thematique->term_id, 'thematiques', FALSE, 'fr'); $thematique_icon = get_field('taxonomy_pictures', $thematique->taxonomy . '_' . $original_term_ID)['icon']; $termSlug = getThematiqueFamilySlug($thematique->slug); @@ -54,15 +50,17 @@ $page_icon = get_field('page_icon', get_queried_object()); 'taxonomy' => 'thematiques', 'field' => 'term_id', 'terms' => $thematique->term_id, + 'include_children' => false ) ) ); - $relatedPostConseil = get_posts($args); - + + $relatedThematiqueConseilsQuery = new WP_Query($args); + $relatedPostConseil = $relatedThematiqueConseilsQuery->posts[0] ?? null; ?>
  • - +

    Question name ?>