$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
$currentThematique = get_the_terms(get_the_ID(), 'thematiques')[0];
$currentThematique = get_the_terms(get_the_ID(), 'thematiques')[0] ?? '';
$mainThematique = getMainThematique($currentThematique);
$thematiqueColorSlug = $mainThematique->slug;