diff --git a/header-demo-components.php b/header-demo-components.php index 7766be8..a1b6d20 100644 --- a/header-demo-components.php +++ b/header-demo-components.php @@ -45,7 +45,7 @@ slug); ?> diff --git a/includes/admin.php b/includes/admin.php index d446229..ce51e73 100644 --- a/includes/admin.php +++ b/includes/admin.php @@ -279,7 +279,7 @@ function wpdocs_admin_classes($classes) $thematique = get_the_terms(get_the_ID(), 'thematiques')[0] ?? null; if (!$thematique) return $classes; - $thematiqueParent = getParentThematique($thematique); + $thematiqueParent = getMainThematique($thematique); $thematiqueColorSlug = getThematiqueFamilySlug($thematiqueParent->slug); $postType = get_post_type($post->ID) ?? null; diff --git a/single.php b/single.php index 845218a..1a7af6f 100644 --- a/single.php +++ b/single.php @@ -8,7 +8,7 @@ get_header(); while (have_posts()) : the_post(); $thematique = get_the_terms(get_the_ID(), 'thematiques')[0]; - $thematiqueParent = getParentThematique($thematique); + $thematiqueParent = getMainThematique($thematique); $thematiqueColorSlug = getThematiqueFamilySlug($thematiqueParent->slug); ?> diff --git a/template-components/archives/brochure-rows.php b/template-components/archives/brochure-rows.php index a681305..33a27a6 100644 --- a/template-components/archives/brochure-rows.php +++ b/template-components/archives/brochure-rows.php @@ -12,7 +12,7 @@ $brochuresPosts = $args['brochuresPosts']; $brochureCover = $brochurePdf['ID'] ? get_field('brochure_cover_image', $brochurePdf['ID']) : null; $brochureEdition = get_field('brochure_edition', get_the_id()) ?? null; $thematique = get_the_terms(get_the_id(), 'thematiques')[0] ?? null; - $rootThematic = getParentThematique($thematique) ?? null; + $rootThematic = getMainThematique($thematique) ?? null; ?>
name ?>
diff --git a/template-components/archives/webinaire-rows.php b/template-components/archives/webinaire-rows.php index d1c0a09..941ac2b 100644 --- a/template-components/archives/webinaire-rows.php +++ b/template-components/archives/webinaire-rows.php @@ -5,7 +5,7 @@ $videosWebinairesPosts = $args['videosWebinairesPosts']; have_posts()) : while ($videosWebinairesPosts->have_posts()) : $videosWebinairesPosts->the_post(); ?> type === "post_type" && $item->type_label === "Conseil") : ?> object_id, "thematiques")[0]; - $postParentThematique = getParentThematique($postThematique); + $postParentThematique = getMainThematique($postThematique); $thematiqueCover = get_field('taxonomy_pictures', "thematiques_" . $postParentThematique->term_id); $thematiqueColorslug = getThematiqueFamilySlug($postThematique->slug); ?> diff --git a/template-components/header/menu-renovateur.php b/template-components/header/menu-renovateur.php index 88f95c6..eef6f56 100644 --- a/template-components/header/menu-renovateur.php +++ b/template-components/header/menu-renovateur.php @@ -104,7 +104,7 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full'); type === "post_type" && $item->type_label === "Conseil") : ?> object_id, "thematiques")[0]; - $postParentThematique = getParentThematique($postThematique); + $postParentThematique = getMainThematique($postThematique); $thematiqueCover = get_field('taxonomy_pictures', "thematiques_" . $postParentThematique->term_id); $thematiqueColorslug = getThematiqueFamilySlug($postThematique->slug); ?>