FIX Checcking if related article to avoid warnings
This commit is contained in:
parent
42704b9cb0
commit
76c5115d0a
|
|
@ -7,15 +7,17 @@ $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 foreach ($issue_related_articles as $article) : ?>
|
||||
<?php get_template_part('template-parts/articles/card-article', null, array(
|
||||
<?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(
|
||||
|
||||
'date' => $article->post_date,
|
||||
'image' => get_the_post_thumbnail_url($article->ID),
|
||||
'link' => get_the_permalink($article->ID),
|
||||
'ID' => $article->ID,
|
||||
'showAuthors' => true,
|
||||
)); ?>
|
||||
<?php endforeach; ?>
|
||||
'date' => $article->post_date,
|
||||
'image' => get_the_post_thumbnail_url($article->ID),
|
||||
'link' => get_the_permalink($article->ID),
|
||||
'ID' => $article->ID,
|
||||
'showAuthors' => true,
|
||||
)); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</section>
|
||||
Loading…
Reference in New Issue
Block a user