parent ? get_term(get_queried_object()->parent, 'thematiques') : get_term(get_queried_object(), 'thematiques'); $thematiqueColorSlug = getThematiqueFamilySlug($thematique_generale->slug); $current_children_thematique = get_queried_object()->parent != 0 ? get_queried_object() : null; echo '
'; print_r($thematiqueColorSlug); echo ''; $args = array( 'posts_per_page' => 1, 'post_type' => 'conseils', 'tax_query' => array( array( 'slug' => 'locations', 'taxonomy' => 'thematiques', 'field' => 'slug', 'terms' => get_queried_object()->slug, // 'include_children' => false, ) ) ); $query_current_thematique_posts = new WP_Query($args); $thematique_related_page = $query_current_thematique_posts->posts[0]; echo '
';
// print_r($term);
// print_r($term_test);
// print_r($query_current_thematique_posts->posts);
// print_r($thematique_related_page);
// print_r($current_children_thematique);
// print_r($current_thematique);
// print_r(is_tax('thematiques', 'thematiques'));
echo '';
$test = get_term_by('id', 12, 'category');
// echo ''; // print_r($thematique_related_page); // echo ''; // echo $the_query->posts[0]->post_content; ?>