handling posts sorting
This commit is contained in:
parent
cda5ce3013
commit
9a3879d4e9
|
|
@ -224,13 +224,14 @@ function build_brochure_archive_rows(WP_REST_Request $request)
|
||||||
'tax_query' => $tax_query,
|
'tax_query' => $tax_query,
|
||||||
);
|
);
|
||||||
$brochuresPosts = new WP_Query($args);
|
$brochuresPosts = new WP_Query($args);
|
||||||
|
$sortedBrochuresPosts = sort_posts_per_thematiques_priority($brochuresPosts);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
get_template_part(
|
get_template_part(
|
||||||
'template-components/archives/brochure-rows',
|
'template-components/archives/brochure-rows',
|
||||||
null,
|
null,
|
||||||
array(
|
array(
|
||||||
'brochuresPosts' => $brochuresPosts,
|
'brochuresPosts' => $sortedBrochuresPosts,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$html_template = ob_get_clean();
|
$html_template = ob_get_clean();
|
||||||
|
|
@ -280,13 +281,14 @@ function build_fiches_info_archive_rows(WP_REST_Request $request)
|
||||||
'tax_query' => $tax_query,
|
'tax_query' => $tax_query,
|
||||||
);
|
);
|
||||||
$ficheInfoPosts = new WP_Query($args);
|
$ficheInfoPosts = new WP_Query($args);
|
||||||
|
$sortedficheInfoPosts = sort_posts_per_thematiques_priority($ficheInfoPosts);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
get_template_part(
|
get_template_part(
|
||||||
'template-components/archives/fiche-info-rows',
|
'template-components/archives/fiche-info-rows',
|
||||||
null,
|
null,
|
||||||
array(
|
array(
|
||||||
'fichesInfosPosts' => $ficheInfoPosts,
|
'fichesInfosPosts' => $sortedficheInfoPosts,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$html_template = ob_get_clean();
|
$html_template = ob_get_clean();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user