From 3f072ca0b2ba29b1e088f9aec471c03124a730b8 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Wed, 29 Nov 2023 17:51:45 +0100 Subject: [PATCH] introducing empty parent template --- template-empty-parent.php | 82 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 template-empty-parent.php diff --git a/template-empty-parent.php b/template-empty-parent.php new file mode 100644 index 0000000..5eae1e2 --- /dev/null +++ b/template-empty-parent.php @@ -0,0 +1,82 @@ + + + + +slug; + + + +?> + +
"> + + + post_parent !== 0 ? get_post($currentPage->post_parent) : null; + $grandParentPage = $parentPage->post_parent ? get_post($parentPage->post_parent) : null; + + $args = array( + 'posts_per_page' => -1, + 'order' => 'ASC', + 'post_parent' => $currentPage->ID, + 'post_type' => 'page', + ); + + $childrenPages = get_children($args); + // echo '
';
+			// print_r($childrens);
+			// echo '
'; + + ?> + + + $pageIcon, + "title" => $currentPage->post_title, + "description" => the_excerpt(), + "coverIllustration" => get_field('page_illustration', $currentPage->ID), + )); + ?> + + $subPage->post_title, + "excerpt" => get_the_excerpt($subPage->ID), + "permalink" => get_the_permalink($subPage->ID), + "coverIllustration" => get_field($subPage->ID), + )); + ?> + + + + + + + + +
+ +