parent ? get_term($thematique->parent, 'thematiques') : $thematique; $thematique_generale_id_fr = apply_filters('wpml_object_id', $thematique_generale->term_id, 'thematiques', TRUE, 'fr'); // Récupère la source de l'image par rapport à l'ID FR pour s'assurer de bien synchroniser les images dans les deux langues $thematique_picture = get_field('taxonomy_pictures', "thematiques_" . $thematique_generale_id_fr)['illustration_s'] ?? null; $lastUpdate = get_the_modified_date('', $args['postID']); $queryArgs = array( // 'fields' => 'ids', 'post_type' => 'brochures', 'posts_per_page' => 1, 'tax_query' => array( array( 'taxonomy' => 'thematiques', 'field' => 'term_id', 'terms' => $thematique->term_id ) ) ); $relatedBrochuresPosts = get_posts($queryArgs); $relatedBrochure = get_field('brochure_pdf', $relatedBrochuresPosts[0]->ID) ?? null; ?>
parent == 0) : ?>

name ?>

'; // print_r($relatedBrochure); // echo ''; ?> $args['postID'], "modified" => $lastUpdate )); ?>