webinaire: switching from repeator to post type

This commit is contained in:
Antoine M 2023-11-30 13:09:37 +01:00
parent d94bb97e65
commit 158f83be9b

View File

@ -29,14 +29,23 @@ $args = array(
'meta_key' => 'brochure_pdf',
'meta_value' => '',
'meta_compare' => '!=',
// ICI METAQUERY FOR LE PDF
);
$fichesInfosPosts = new WP_Query($args);
// #### VIDÉOS & WEBINAIRES QUERY
$videosWebinairesDatas = get_field('videos_webinaires', $current_page_id)['videos_webinaires_datas'] ?? null;
// #### WEBINAIRES QUERY
$args = array(
'post_type' => 'videos-webinaires',
'posts_per_page' => -1,
'post_status' => 'publish',
'order' => 'DESC',
'orderby' => 'date',
);
$videosWebinairesPosts = new WP_Query($args);
$total_posts_found = $brochuresPosts->found_posts + $fichesInfosPosts->found_posts + count($videosWebinairesDatas);
// #### VIDÉOS & WEBINAIRES QUERY
// $videosWebinairesDatas = get_field('videos_webinaires', $current_page_id)['videos_webinaires_datas'] ?? null;
$total_posts_found = $brochuresPosts->found_posts + $fichesInfosPosts->found_posts + $videosWebinairesPosts->found_posts;
?>
<div class="template-archives template-archives--publications">
@ -273,7 +282,7 @@ $total_posts_found = $brochuresPosts->found_posts + $fichesInfosPosts->found_pos
'template-components/archives/webinaire-rows',
null,
array(
'videosWebinairesDatas' => $videosWebinairesDatas,
'videosWebinairesPosts' => $videosWebinairesPosts,
)
)
?>