diff --git a/blocks/post-card/build/render.php b/blocks/post-card/build/render.php index 33be0a0..77fdf6a 100644 --- a/blocks/post-card/build/render.php +++ b/blocks/post-card/build/render.php @@ -12,7 +12,7 @@ $mainThematique = getMainThematique($thematique); $thematiqueColorSlug = $mainThematique->slug; $thematique_icon = get_field('taxonomy_pictures', 'thematiques' . '_' . $mainThematique->term_id)['icon']; -$postDescription = $attributes['postDescription']; +$postDescription = $attributes['postDescription'] ?? null; $coverUrl = $postType->name === 'videos-webinaires' && $postThumbnail ? $postThumbnail : ($thematique_icon ? $thematique_icon['url'] : null); diff --git a/blocks/post-card/src/render.php b/blocks/post-card/src/render.php index 33be0a0..77fdf6a 100644 --- a/blocks/post-card/src/render.php +++ b/blocks/post-card/src/render.php @@ -12,7 +12,7 @@ $mainThematique = getMainThematique($thematique); $thematiqueColorSlug = $mainThematique->slug; $thematique_icon = get_field('taxonomy_pictures', 'thematiques' . '_' . $mainThematique->term_id)['icon']; -$postDescription = $attributes['postDescription']; +$postDescription = $attributes['postDescription'] ?? null; $coverUrl = $postType->name === 'videos-webinaires' && $postThumbnail ? $postThumbnail : ($thematique_icon ? $thematique_icon['url'] : null);