fixing webinaire cta

This commit is contained in:
Antoine M 2023-11-30 15:31:35 +01:00
parent 0e8d414338
commit 6539145946

View File

@ -15,7 +15,6 @@ $args = array(
'meta_key' => 'brochure_pdf', 'meta_key' => 'brochure_pdf',
'meta_value' => '', 'meta_value' => '',
'meta_compare' => '!=', 'meta_compare' => '!=',
// ICI METAQUERY FOR LE PDF
); );
$brochuresPosts = new WP_Query($args); $brochuresPosts = new WP_Query($args);
@ -38,7 +37,8 @@ $args = array(
'posts_per_page' => -1, 'posts_per_page' => -1,
'post_status' => 'publish', 'post_status' => 'publish',
'order' => 'DESC', 'order' => 'DESC',
'orderby' => 'date', 'meta_key' => 'video_publication_date',
'orderby' => 'meta_value_num',
); );
$videosWebinairesPosts = new WP_Query($args); $videosWebinairesPosts = new WP_Query($args);
@ -242,7 +242,7 @@ $total_posts_found = $brochuresPosts->found_posts + $fichesInfosPosts->found_pos
$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); $webinaireThumbnail = get_the_post_thumbnail_url($highlightedWebinaire->ID);
$webinaireEmbed = get_field('embed', $highlightedWebinaire->ID); $webinaireEmbed = get_field('embed', $highlightedWebinaire->ID);
$webinaireUrl = get_field('url', $highlightedWebinaire->ID); $highlightedWebinaireUrl = get_field('url', $highlightedWebinaire->ID);
?> ?>
<!-- HIGHLIGHTED WEBINAIRE --> <!-- HIGHLIGHTED WEBINAIRE -->
@ -260,7 +260,7 @@ $total_posts_found = $brochuresPosts->found_posts + $fichesInfosPosts->found_pos
<h4 class="highlighted-publication__titling__subtitle"><?php echo $highlightedWebinaire->post_title ?></h4> <h4 class="highlighted-publication__titling__subtitle"><?php echo $highlightedWebinaire->post_title ?></h4>
<p class="highlighted-publication__comment"><?php echo get_the_excerpt($highlightedWebinaire->ID) ?></p> <p class="highlighted-publication__comment"><?php echo get_the_excerpt($highlightedWebinaire->ID) ?></p>
<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> <a class="cta cta--secondary cta--button" href="<?php echo $highlightedWebinaireUrl ?>" target="_blank"><?php echo __("Consulter la vidéo", "homegrade-theme__texte-fonctionnel__archive-publications") ?></a>
</div> </div>
<?php if ($webinaireEmbed) : ?> <?php if ($webinaireEmbed) : ?>