diff --git a/template-publications.php b/template-publications.php index 4490ae1..1819cda 100644 --- a/template-publications.php +++ b/template-publications.php @@ -15,7 +15,6 @@ $args = array( 'meta_key' => 'brochure_pdf', 'meta_value' => '', 'meta_compare' => '!=', - // ICI METAQUERY FOR LE PDF ); $brochuresPosts = new WP_Query($args); @@ -38,7 +37,8 @@ $args = array( 'posts_per_page' => -1, 'post_status' => 'publish', 'order' => 'DESC', - 'orderby' => 'date', + 'meta_key' => 'video_publication_date', + 'orderby' => 'meta_value_num', ); $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; $webinaireThumbnail = get_the_post_thumbnail_url($highlightedWebinaire->ID); $webinaireEmbed = get_field('embed', $highlightedWebinaire->ID); - $webinaireUrl = get_field('url', $highlightedWebinaire->ID); + $highlightedWebinaireUrl = get_field('url', $highlightedWebinaire->ID); ?> @@ -260,7 +260,7 @@ $total_posts_found = $brochuresPosts->found_posts + $fichesInfosPosts->found_pos
ID) ?>
- +