removing old automatic loop display

This commit is contained in:
Antoine M 2024-07-09 14:53:33 +02:00
parent 8b3327e9af
commit f1287d8928

View File

@ -46,51 +46,10 @@ $parcoursSteps = new WP_Query(array(
$page_icon = get_field('page_icon', get_queried_object());
$pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
get_template_part("template-components/heading-box", null, array(
"pageIcon" => $pageIcon,
"title" => get_the_title(),
"description" => __("Toutes les étapes à connaître pour rénover votre logement.", "homegrade-theme__texte-fonctionnel"),
));
?>
<section class="parcours-steps-container">
<?php foreach ($parcoursSteps->posts as $parcoursStep) : ?>
<div class="parcours-steps-container__step card">
<?php
$childrenStepPosts = get_posts(array(
'post_type' => 'parcours',
'posts_per_page' => -1,
'status' => 'publish',
'order' => 'menu_order',
'post_parent' => $parcoursStep->ID,
));
$stepIcon = get_field('step_icon', $parcoursStep->ID);
?>
<img class="step-icon" src="<?php echo $stepIcon['url'] ?>" alt="">
<h2><?php echo $parcoursStep->post_title ?></h2>
<p><?php echo $parcoursStep->post_excerpt ?> </p>
<?php foreach ($childrenStepPosts as $childPost) : ?>
<?php endforeach; ?>
<a class="cta cta--en-savoir-plus " href="<?php echo get_permalink($parcoursStep->ID) ?>">
<?php echo __("En savoir plus ", "homegrade-theme__texte-fonctionnel") ?>
<div class="cta_arrow_button">
<img src='<?php echo get_template_directory_uri() ?>/resources/img/graphic-assets/arrow-right-circle.svg' alt=''>
</div>
</a>
</div>
<?php endforeach; ?>
</section>
<?php
the_content();