From c3333cf403de6cadae87130c8a2a35c6df80a926 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Tue, 24 Feb 2026 15:00:09 +0100 Subject: [PATCH] REFACTOR Component with a lastest-parutions sub-component template parts for better readability --- archive-analyses-etudes.php | 64 ++++--------------------------------- 1 file changed, 6 insertions(+), 58 deletions(-) diff --git a/archive-analyses-etudes.php b/archive-analyses-etudes.php index c474d8d..84b596e 100644 --- a/archive-analyses-etudes.php +++ b/archive-analyses-etudes.php @@ -17,67 +17,15 @@ ) )); ?> -
-

Dernière parution

- 1, // Number of recent posts thumbnails to display - 'post_status' => 'publish', // Show only the published posts - 'post_type' => 'analyses-etudes', - 'orderby' => 'date', - 'order' => 'DESC', - 'tax_query' => array( - array( - 'taxonomy' => 'type', - 'field' => 'slug', - 'terms' => 'analyse', - ), - ), - )); - $latest_etude = get_posts(array( - 'posts_per_page' => 1, // Number of recent posts thumbnails to display - 'post_status' => 'publish', // Show only the published posts - 'post_type' => 'analyses-etudes', - 'orderby' => 'date', - 'order' => 'DESC', - 'tax_query' => array( - array( - 'taxonomy' => 'type', - 'field' => 'slug', - 'terms' => 'etude', - ), - ), - )); - $recent_posts = array_merge($latest_analyse, $latest_etude); - - ?> - - ID, 'type'); - ?> -
- name)) : ?> -
- - - - ID, 'medium'); ?> -

ID); ?>

-
-
-
- -
+ 1, + 'post_type' => 'analyses-etudes', + )); + ?> - +