FIX Checcking if related article to avoid warnings

This commit is contained in:
Nonimart 2025-10-30 11:02:12 +01:00
parent 42704b9cb0
commit 76c5115d0a

View File

@ -7,6 +7,7 @@ $issue_related_articles = get_field('articles', $revueID);
<section class="table-matieres">
<h3 class="content-tab__title">Table des matières</h3>
<ul class="post-grid__list article-grid__list">
<?php if ($issue_related_articles && is_array($issue_related_articles)) : ?>
<?php foreach ($issue_related_articles as $article) : ?>
<?php get_template_part('template-parts/articles/card-article', null, array(
@ -17,5 +18,6 @@ $issue_related_articles = get_field('articles', $revueID);
'showAuthors' => true,
)); ?>
<?php endforeach; ?>
<?php endif; ?>
</ul>
</section>