hadnling post date

This commit is contained in:
Antoine M 2023-11-16 16:24:14 +01:00
parent 9f8b52dc46
commit 89ef334b04

View File

@ -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,
)
);
}