a
PHP
$post_id = get_page_by_path($slug, OBJECT, $postType)->ID;
$data = [
'permalink' => get_the_permalink($post_id),
'title' => get_the_title($post_id),
'category' => get_the_category($post_id),
'date_post' => get_the_time('Y/m/d', $post_id),
'date_update' => get_the_modified_time('Y/m/d', $post_id),
'datetime_post' => get_the_time('Y-m-d', $post_id),
'datetime_update' => get_the_modified_time('Y-m-d', $post_id),
'tags' => get_the_tags($post_id),
'thumbnail' => has_post_thumbnail($post_id) ? get_the_post_thumbnail_url($post_id) : DUMMY_IMAGE ,
];