handling the photo grid
This commit is contained in:
parent
73b8b807b3
commit
06bf350c82
|
|
@ -148,7 +148,7 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
|
|||
$chantier_description = get_field('description', $chantier->ID);
|
||||
$date = get_field('date', $chantier->ID);
|
||||
$city = get_field('city', $chantier->ID);
|
||||
|
||||
$pictures = get_field('pictures', $chantier->ID);
|
||||
?>
|
||||
<div class="chantier">
|
||||
|
||||
|
|
@ -158,11 +158,25 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
|
|||
<time class="chantier__date"> <?php echo $date ?></time>
|
||||
</div>
|
||||
<p class="chantier__description"><?php echo $chantier_description ?></p>
|
||||
|
||||
<div class="chantier__photo-grid">
|
||||
<?php
|
||||
foreach ($pictures as $key => $picture) {
|
||||
}
|
||||
?>
|
||||
|
||||
<?php foreach ($pictures as $picture): ?>
|
||||
<img src="<?php echo $picture['sizes']['large'] ?>" />
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
|
@ -170,7 +184,46 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<?php
|
||||
$prevPost = get_previous_post();
|
||||
$nextPost = get_next_post();
|
||||
// echo $prev_post->post_title;
|
||||
write_log($nextPost);
|
||||
|
||||
echo '<pre>';
|
||||
print_r($prevPost);
|
||||
echo '</pre>';
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<?php if ($nextPost) : ?>
|
||||
<a class="previous-next-questions__next" href="<?php echo get_the_permalink($nextPost->ID) ?>">
|
||||
<div class="previous-next-questions__link-content">
|
||||
<p class="question_type"><?php echo __("Entreprise suivante ", "homegrade-theme__texte-fonctionnel") ?></p>
|
||||
<p class="question_title"><?php echo $nextPost->post_title ?></p>
|
||||
</div>
|
||||
<img class="thematique_icon" src="<?php echo $thematique_icon['url'] ?>" alt="">
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($previousPost) : ?>
|
||||
<a class="previous-next-questions__previous" href="<?php echo get_the_permalink($previousPost->ID) ?>">
|
||||
<img class="thematique_icon" src="<?php echo $thematique_icon['url'] ?>" alt="">
|
||||
<div class="previous-next-questions__link-content">
|
||||
<p class="question_type"><?php echo __("Entreprise précédente ", "homegrade-theme__texte-fonctionnel") ?></p>
|
||||
<p class="question_title"><?php echo $previousPost->post_title ?></p>
|
||||
</div>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
|
||||
|
||||
get_template_part('template-components/conseil-patrimoine-redirector', null, array());
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user