From 89ef334b047f5cab2290b761010b5fca5a2bf447 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Thu, 16 Nov 2023 16:24:14 +0100 Subject: [PATCH] hadnling post date --- template-archive-news.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/template-archive-news.php b/template-archive-news.php index ee63b97..063a27c 100644 --- a/template-archive-news.php +++ b/template-archive-news.php @@ -94,6 +94,7 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null; foreach ($posts->posts as $key => $post) { $post_thumbnail = get_the_post_thumbnail($post->ID, 'full', array('class' => 'card-news__thumbnail card-post__thumbnail')) ?? null; $news_type = get_the_terms($post->ID, "news_type") ?? null; + $post_date = get_the_date('j.m.Y', $post->ID) ?? null; get_template_part( 'template-components/cards/card-news', @@ -104,6 +105,7 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null; 'post_title' => $post->post_title, 'post_thumbnail' => $post_thumbnail, 'news_type' => $news_type, + 'post_date' => $post_date, ) ); }