adapting mede-eigendommen slug

This commit is contained in:
Antoine M 2024-07-23 11:34:31 +02:00
parent e03fb775e7
commit 594cfc35b4

View File

@ -10,6 +10,7 @@ function getThematiqueFamilySlug($thematique_slug)
if (!$thematique_slug) {
return null;
}
switch ($thematique_slug) {
case "energie":
case "urbanisme":
@ -20,7 +21,7 @@ function getThematiqueFamilySlug($thematique_slug)
case "akoestiek":
case "petites-coproprietes":
case "coproprietes":
case "kleine-mede-eigendommen":
case "mede-eigendommen":
return "acoustique-coproprietes";
case "isolation":
@ -267,3 +268,22 @@ function build_page_chapter_index($blocks)
}
return $chapterBlockIndex;
}
/* -------------------------------------------
GET PARCOURS PREVIOUS/NEXT POSTS
---------------------------------------------*/
function get_parcours_previous_next_posts($post)
{
$prev_post = get_previous_post() ?? null;
$next_post = get_next_post() ?? null;
$test_next = get_adjacent_post(false, '', false, 'thematiques');
$test = new WP_Query(array('orderby' => 'menu_order', 'order' => 'ASC'));
return [
'prev_post' => $prev_post,
'next_post' => $next_post,
'test' => $test_next
];
}