carhop__carhop-theme__DEV/template-parts/dynamiques/article-card.php
2025-09-04 17:05:09 +02:00

35 lines
957 B
PHP

<?php
$articleID = $args['ID'];
$isSwiperSlide = $args['isSwiperSlide'];
?>
<div class="article-card <?php echo $isSwiperSlide ? 'swiper-slide' : ''; ?>">
<div class="content-meta">
<span class="content-meta__type content-meta__type--article">Article</span>
</div>
<a href="<?php echo get_the_permalink($articleID); ?>" class="article-card__link">
<h4 class="article-card__title"><?php echo get_the_title($articleID); ?></h4>
</a>
<ul class="article-card__tags">
<?php
$terms = get_the_terms($articleID, 'etiquettes');
if ($terms): ?>
<?php foreach ($terms as $term): ?>
<li class="article-card__tag article-tag"><?php echo esc_html($term->name); ?></li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
<?php get_template_part('template-parts/components/cta--go', null, array(
'url' => get_the_permalink($articleID),
'label' => 'Lire la revue lol',
'target' => '_self',
)); ?>
</div>