FEATURE Completion of main behaviours

This commit is contained in:
Nonimart 2025-06-25 12:28:43 +02:00
parent 15487c8891
commit 3ef493e118

View File

@ -8,8 +8,6 @@ if ($isArticle) {
} else {
$authors = getRevueAuthors($postId);
}
if (empty($authors)) return;
$authorsLastPosts = get_posts(array(
@ -19,15 +17,23 @@ $authorsLastPosts = get_posts(array(
'orderby' => 'date',
'order' => 'DESC',
));
if (empty($authorsLastPosts)) return;
?>
<div class="authors-last-publications">
<?php if (count($authors) <= 1) : ?>
<h3 class="title-small">Ses dernières publications</h3>
<?php else : ?>
<h3 class="title-small">Leurs dernières publications</h3>
<?php endif; ?>
<?php foreach ($authorsLastPosts as $post) : ?>
<?php get_template_part('template-parts/articles/card-article', null, array(
<?php foreach ($authorsLastPosts as $post) : ?>
<?php get_template_part('template-parts/articles/card-article', null, array(
'ID' => $post->ID,
'showAuthors' => true,
)); ?>
<?php endforeach; ?>
<?php endforeach; ?>
</div>
<?php wp_reset_postdata(); ?>