handling empty value + removing unecessary icon query
This commit is contained in:
parent
66d1242328
commit
2ac170e79c
|
|
@ -2,12 +2,10 @@
|
||||||
// NEEDS TO BE A QUERY POST OBJECT
|
// NEEDS TO BE A QUERY POST OBJECT
|
||||||
$brochuresPosts = $args['brochuresPosts'];
|
$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', get_the_id()) ?? null;
|
$brochurePdf = get_field('brochure_pdf', get_the_id()) ?? null;
|
||||||
|
|
||||||
|
|
||||||
// RETURN IF NO PDF
|
// RETURN IF NO PDF
|
||||||
if (!$brochurePdf) continue;
|
if (!$brochurePdf) continue;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,4 +30,8 @@ $fichesInfosPosts = $args['fichesInfosPosts'];
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<?php endwhile ?>
|
<?php endwhile ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if (!$fichesInfosPosts->have_posts()) : ?>
|
||||||
|
<p class="publications-grid__no-results filters-no-results"><?php echo __("Aucune fiche-info n'a été trouvée", "homegrade-theme__texte-fonctionnel__publications-archive") ?></p>
|
||||||
|
<?php endif ?>
|
||||||
Loading…
Reference in New Issue
Block a user