Compare commits

..

3 Commits

Author SHA1 Message Date
Antoine M
6ed5634638 FEATURE Adding hasPostTypeNumerotation function to inform about specific post types numerotation supports
All checks were successful
continuous-integration/drone/push Build is passing
2026-02-17 14:56:12 +01:00
Antoine M
c8276ba10d REFINE Simplifying post rendering by replacing inline markup with reusable post-card component 2026-02-17 14:55:24 +01:00
Antoine M
cd4c76fcfa REFINE Removing unnecessary whitespace in post-grid component 2026-02-17 14:54:59 +01:00
3 changed files with 16 additions and 16 deletions

View File

@ -60,3 +60,16 @@ function get_archive_page_subtitle_html($post_type)
return '';
}
}
function hasPostTypeNumerotation($post_type)
{
switch ($post_type) {
case 'analyses-etudes':
case 'expositions':
case 'outils-pedagogiques':
case 'recherches':
case 'revues':
return true;
default:
return false;
}
}

View File

@ -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>

View File

@ -76,8 +76,6 @@ $types = get_terms(array(
<option value="date_asc"><?php _e('Numéros anciens en premier', 'dynamiques'); ?></option>
<option value="title_asc"><?php _e('Par ordre alphabétique', 'dynamiques'); ?></option>
</select>
</div>