diff --git a/template-publications.php b/template-publications.php index e9ea5d2..2eec375 100644 --- a/template-publications.php +++ b/template-publications.php @@ -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; ?>