<?php
$relatedPostId = $attributes['relatedPostId'] ?? null;
$relatedPost = get_post($relatedPostId) ?? null;
$relatedPostUrl = get_permalink($relatedPostId) ?? null;

$postIcon =  get_field("step_icon", $relatedPostId) ?? null;


?>
<a class="parcours-step-card" href="<?php echo $relatedPostUrl ?>">
	<img class="parcours-step-card__icon" src="<?php echo $postIcon['url'] ?>" alt="">
	<h3 class="parcours-step-card__title"><?php echo $relatedPost->post_title; ?></h3>
</a>