$currentThematique conditionnal null

This commit is contained in:
Antoine M 2024-05-27 11:11:12 +02:00
parent 7797518550
commit 7f2651ff76

View File

@ -1,6 +1,6 @@
<?php get_header(); ?> <?php get_header(); ?>
<?php <?php
$currentThematique = get_the_terms(get_the_ID(), 'thematiques')[0]; $currentThematique = get_the_terms(get_the_ID(), 'thematiques')[0] ?? '';
$mainThematique = getMainThematique($currentThematique); $mainThematique = getMainThematique($currentThematique);
$thematiqueColorSlug = $mainThematique->slug; $thematiqueColorSlug = $mainThematique->slug;