handling null value
This commit is contained in:
parent
52881f3ccd
commit
7e075648a5
|
|
@ -5,11 +5,11 @@ $brochuresPosts = $args['brochuresPosts'];
|
||||||
|
|
||||||
<?php if ($brochuresPosts->have_posts()) : while ($brochuresPosts->have_posts()) : $brochuresPosts->the_post(); ?>
|
<?php if ($brochuresPosts->have_posts()) : while ($brochuresPosts->have_posts()) : $brochuresPosts->the_post(); ?>
|
||||||
<?php
|
<?php
|
||||||
$brochurePdf = get_field('brochure_pdf', $args['ID']);
|
$brochurePdf = get_field('brochure_pdf', get_the_id()) ?? null;
|
||||||
$brochureCover = get_field('brochure_cover_image', $brochurePdf['ID']);
|
$brochureCover = get_field('brochure_cover_image', $brochurePdf['ID']) ?? null;
|
||||||
$brochureEdition = get_field('brochure_edition', $args['ID']);
|
$brochureEdition = get_field('brochure_edition', get_the_id()) ?? null;
|
||||||
$thematique = get_the_terms($args['ID'], 'thematiques')[0];
|
$thematique = get_the_terms(get_the_id(), 'thematiques')[0] ?? null;
|
||||||
$rootThematic = getParentThematique($thematique);
|
$rootThematic = getParentThematique($thematique) ?? null;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<li class="publications-grid__row">
|
<li class="publications-grid__row">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user