From 117aab7ef054dda17a638151a12c2ff930bd9377 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Mon, 1 Jul 2024 15:43:59 +0200 Subject: [PATCH] refining query loop --- single-parcours.php | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/single-parcours.php b/single-parcours.php index f0541cc..a4d00b9 100644 --- a/single-parcours.php +++ b/single-parcours.php @@ -1,16 +1,21 @@ -
- +
+ + post_parent === 0; + if ($isParentPage) { + get_template_part('single-parcours-parent'); + } else { + get_template_part('single-parcours-child'); + } + ?> +
+ + - $isParentPage = get_queried_object()->post_parent === 0; - if ($isParentPage) { - get_template_part('single-parcours-parent'); - } else { - get_template_part('single-parcours-child'); - } - ?> -