"publish",
"post_type" => "artisans",
"posts_per_page" => -1,
"paged" => 1,
]);
foreach ($initialPosts->posts as $key => $artisanPost) {
$post_date = get_the_date('j.m.Y', $artisanPost->ID) ?? null;
get_template_part(
'template-components/artisans/card-artisans-search',
null,
array(
'card_variant' => 'activite',
'post_ID' => $artisanPost->ID,
'post_title' => get_the_title($artisanPost->ID),
'current_taxonomy' => "elementsbatiments",
'post_date' => $post_date,
)
);
}
?>