diff --git a/template-parts/components/archive/latest-parutions.php b/template-parts/components/archive/latest-parutions.php index 9aae8bc..bba85fb 100644 --- a/template-parts/components/archive/latest-parutions.php +++ b/template-parts/components/archive/latest-parutions.php @@ -10,6 +10,12 @@ $posts_query = new WP_Query(array( 'order' => 'DESC', )); + +if ($post_type === 'analyses-etudes') : + $posts_query = get_last_analyses_etudes_posts(); +endif; + + $posts = $posts_query->posts; $current_post_type = $args['current_post_type'] ?? get_post_type(); @@ -24,8 +30,8 @@ $current_post_type = $args['current_post_type'] ?? get_post_type(); - get_the_ID(), + $post->ID, )); ?> \ No newline at end of file