REFINE Simplifying post rendering by replacing inline markup with reusable post-card component
This commit is contained in:
parent
cd4c76fcfa
commit
c8276ba10d
|
|
@ -24,19 +24,8 @@ $current_post_type = $args['current_post_type'] ?? get_post_type();
|
|||
<?php endif; ?>
|
||||
|
||||
<?php foreach ($posts as $post) : ?>
|
||||
|
||||
<div class="post-card post-card--analyses-etudes">
|
||||
<div class="latest-parution__item">
|
||||
|
||||
<?php get_template_part('template-parts/components/content-meta', null, array(
|
||||
'current_post_type' => $current_post_type,
|
||||
'current_post_id' => $post->ID
|
||||
)); ?>
|
||||
<a href="<?php echo get_the_permalink($post->ID); ?>">
|
||||
<?php echo get_the_post_thumbnail($post->ID, 'medium'); ?>
|
||||
<h3><?php echo get_the_title($post->ID); ?></h3>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php get_template_part('template-parts/components/post-card', null, array(
|
||||
'ID' => get_the_ID(),
|
||||
)); ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user