adapting highlighted webinaire

This commit is contained in:
Antoine M 2023-11-30 13:31:17 +01:00
parent 14e65cc7ab
commit 0e8d414338

View File

@ -240,6 +240,9 @@ $total_posts_found = $brochuresPosts->found_posts + $fichesInfosPosts->found_pos
</div> </div>
<?php <?php
$highlightedWebinaire = get_field('highlighted_webinaire', $current_page_id) ?? null; $highlightedWebinaire = get_field('highlighted_webinaire', $current_page_id) ?? null;
$webinaireThumbnail = get_the_post_thumbnail_url($highlightedWebinaire->ID);
$webinaireEmbed = get_field('embed', $highlightedWebinaire->ID);
$webinaireUrl = get_field('url', $highlightedWebinaire->ID);
?> ?>
<!-- HIGHLIGHTED WEBINAIRE --> <!-- HIGHLIGHTED WEBINAIRE -->
@ -254,21 +257,14 @@ $total_posts_found = $brochuresPosts->found_posts + $fichesInfosPosts->found_pos
<?php echo __("Sélection de nos conseillers", "homegrade-theme__texte-fonctionnel__publications-archive-brochures") ?> <?php echo __("Sélection de nos conseillers", "homegrade-theme__texte-fonctionnel__publications-archive-brochures") ?>
</h3> </h3>
</div> </div>
<?php if ($highlightedWebinaire['title']) : ?> <h4 class="highlighted-publication__titling__subtitle"><?php echo $highlightedWebinaire->post_title ?></h4>
<h4 class="highlighted-publication__titling__subtitle"><?php echo $highlightedWebinaire['title'] ?></h4>
<?php endif; ?> <p class="highlighted-publication__comment"><?php echo get_the_excerpt($highlightedWebinaire->ID) ?></p>
<?php if ($highlightedWebinaire['commentary']) : ?> <a class="cta cta--secondary cta--button" href="<?php echo $webinaireUrl ?>" target="_blank"><?php echo __("Consulter la vidéo", "homegrade-theme__texte-fonctionnel__archive-publications") ?></a>
<p class="highlighted-publication__comment"><?php echo $highlightedWebinaire['commentary'] ?></p>
<?php endif; ?>
<a class="cta cta--secondary cta--button" href="<?php echo $highlightedWebinaire['url'] ?>" target="_blank"><?php echo __("Consulter la vidéo", "homegrade-theme__texte-fonctionnel__archive-publications") ?></a>
</div> </div>
<?php if ($highlightedWebinaire['thumbnail']) : ?>
<div class="highlighted-publication__thumbnail-cover"> <?php if ($webinaireEmbed) : ?>
<img src='<?php echo $highlightedWebinaire['thumbnail']['url'] ?>' alt="<?php echo $highlightedWebinaire['thumbnail']['alt'] ?>" /> <?php echo $webinaireEmbed ?>
</div>
<?php endif; ?>
<?php if ($highlightedWebinaire['embed']) : ?>
<?php echo $highlightedWebinaire['embed'] ?>
<?php endif; ?> <?php endif; ?>