hadnling post date
This commit is contained in:
parent
9f8b52dc46
commit
89ef334b04
|
|
@ -94,6 +94,7 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
|
||||||
foreach ($posts->posts as $key => $post) {
|
foreach ($posts->posts as $key => $post) {
|
||||||
$post_thumbnail = get_the_post_thumbnail($post->ID, 'full', array('class' => 'card-news__thumbnail card-post__thumbnail')) ?? null;
|
$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;
|
$news_type = get_the_terms($post->ID, "news_type") ?? null;
|
||||||
|
$post_date = get_the_date('j.m.Y', $post->ID) ?? null;
|
||||||
|
|
||||||
get_template_part(
|
get_template_part(
|
||||||
'template-components/cards/card-news',
|
'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_title' => $post->post_title,
|
||||||
'post_thumbnail' => $post_thumbnail,
|
'post_thumbnail' => $post_thumbnail,
|
||||||
'news_type' => $news_type,
|
'news_type' => $news_type,
|
||||||
|
'post_date' => $post_date,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user