FEATURE Completion of main behaviours
This commit is contained in:
parent
15487c8891
commit
3ef493e118
|
|
@ -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(
|
||||
'ID' => $post->ID,
|
||||
'showAuthors' => true,
|
||||
)); ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<?php wp_reset_postdata(); ?>
|
||||
Loading…
Reference in New Issue
Block a user