switching function call from getParentThematique to getMainThematique
This commit is contained in:
parent
7ec223315a
commit
daa9dcae9b
|
|
@ -45,7 +45,7 @@
|
|||
<?php
|
||||
|
||||
$thematique = get_the_terms(get_the_ID(), 'thematiques')[0];
|
||||
$thematiqueParent = getParentThematique($thematique);
|
||||
$thematiqueParent = getMainThematique($thematique);
|
||||
$thematiqueColorSlug = getThematiqueFamilySlug($thematiqueParent->slug);
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
?>
|
||||
|
||||
<li class="publications-grid__row">
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ $fichesInfosPosts = $args['fichesInfosPosts'];
|
|||
$thematiques = get_the_terms(get_the_ID(), 'thematiques');
|
||||
|
||||
$mainThematique = get_the_terms(get_the_ID(), 'thematiques')[0] ?? null;
|
||||
$rootThematic = getParentThematique($mainThematique) ?? null;
|
||||
$rootThematic = getMainThematique($mainThematique) ?? null;
|
||||
$rootThematicIcon = get_field('taxonomy_pictures', "thematiques_" . $rootThematic->term_id)['icon'] ?? null;
|
||||
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ $fichesInfosPosts = $args['fichesInfosPosts'];
|
|||
|
||||
<?php foreach ($thematiques as $thematique) : ?>
|
||||
<?php
|
||||
$rootThematic = getParentThematique($thematique) ?? null;
|
||||
$rootThematic = getMainThematique($thematique) ?? null;
|
||||
$rootThematicIcon = get_field('taxonomy_pictures', "thematiques_" . $rootThematic->term_id)['icon'] ?? null;
|
||||
?>
|
||||
<p class="publications-grid__thematique thematique-tag thematique-tag--<?php echo $rootThematic->slug ?>"><?php echo $rootThematic->name ?></p>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ $videosWebinairesPosts = $args['videosWebinairesPosts'];
|
|||
<?php if ($videosWebinairesPosts->have_posts()) : while ($videosWebinairesPosts->have_posts()) : $videosWebinairesPosts->the_post(); ?>
|
||||
<?php
|
||||
$thematique = get_the_terms(get_the_ID(), 'thematiques')[0] ?? null;
|
||||
$mainThematique = getParentThematique($thematique) ?? null;
|
||||
$mainThematique = getMainThematique($thematique) ?? null;
|
||||
$publicationDate = get_field("video_publication_date", get_the_ID());
|
||||
$webinaireUrl = get_field("url", get_the_ID());
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
|||
<?php if ($item->type === "post_type" && $item->type_label === "Conseil") : ?>
|
||||
<?php
|
||||
$postThematique = get_the_terms($item->object_id, "thematiques")[0];
|
||||
$postParentThematique = getParentThematique($postThematique);
|
||||
$postParentThematique = getMainThematique($postThematique);
|
||||
$thematiqueCover = get_field('taxonomy_pictures', "thematiques_" . $postParentThematique->term_id);
|
||||
$thematiqueColorslug = getThematiqueFamilySlug($postThematique->slug);
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
|||
<?php if ($item->type === "post_type" && $item->type_label === "Conseil") : ?>
|
||||
<?php
|
||||
$postThematique = get_the_terms($item->object_id, "thematiques")[0];
|
||||
$postParentThematique = getParentThematique($postThematique);
|
||||
$postParentThematique = getMainThematique($postThematique);
|
||||
$thematiqueCover = get_field('taxonomy_pictures', "thematiques_" . $postParentThematique->term_id);
|
||||
$thematiqueColorslug = getThematiqueFamilySlug($postThematique->slug);
|
||||
?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user