webinaire: switching from repeator to post type
This commit is contained in:
parent
d94bb97e65
commit
158f83be9b
|
|
@ -29,14 +29,23 @@ $args = array(
|
||||||
'meta_key' => 'brochure_pdf',
|
'meta_key' => 'brochure_pdf',
|
||||||
'meta_value' => '',
|
'meta_value' => '',
|
||||||
'meta_compare' => '!=',
|
'meta_compare' => '!=',
|
||||||
// ICI METAQUERY FOR LE PDF
|
|
||||||
);
|
);
|
||||||
$fichesInfosPosts = new WP_Query($args);
|
$fichesInfosPosts = new WP_Query($args);
|
||||||
|
|
||||||
// #### VIDÉOS & WEBINAIRES QUERY
|
// #### WEBINAIRES QUERY
|
||||||
$videosWebinairesDatas = get_field('videos_webinaires', $current_page_id)['videos_webinaires_datas'] ?? null;
|
$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">
|
<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',
|
'template-components/archives/webinaire-rows',
|
||||||
null,
|
null,
|
||||||
array(
|
array(
|
||||||
'videosWebinairesDatas' => $videosWebinairesDatas,
|
'videosWebinairesPosts' => $videosWebinairesPosts,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user