From 2a70b7ba43177a2bfa31d4ea9c84040a59402137 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Wed, 29 Nov 2023 18:48:42 +0100 Subject: [PATCH] refining page empty parent --- resources/css/pages/template-empty-parent.css | 5 ++++ template-empty-parent.php | 30 +++++++++++-------- 2 files changed, 22 insertions(+), 13 deletions(-) create mode 100644 resources/css/pages/template-empty-parent.css diff --git a/resources/css/pages/template-empty-parent.css b/resources/css/pages/template-empty-parent.css new file mode 100644 index 0000000..581c1a0 --- /dev/null +++ b/resources/css/pages/template-empty-parent.css @@ -0,0 +1,5 @@ +.template-empty-parent { + .page-cards { + @apply mt-12 mb-20; + } +} diff --git a/template-empty-parent.php b/template-empty-parent.php index 5eae1e2..2b0d1ae 100644 --- a/template-empty-parent.php +++ b/template-empty-parent.php @@ -11,7 +11,7 @@ $thematiqueColorSlug = $mainThematique->slug; ?> -
"> +
slug; 'order' => 'ASC', 'post_parent' => $currentPage->ID, 'post_type' => 'page', + 'status' => 'publish', ); $childrenPages = get_children($args); @@ -52,26 +53,29 @@ $thematiqueColorSlug = $mainThematique->slug; + $pageIcon, "title" => $currentPage->post_title, - "description" => the_excerpt(), - "coverIllustration" => get_field('page_illustration', $currentPage->ID), + "description" => get_the_excerpt(), + "pageIcon" => get_field('page_icon', $currentPage->ID), )); ?> - - $subPage->post_title, - "excerpt" => get_the_excerpt($subPage->ID), - "permalink" => get_the_permalink($subPage->ID), - "coverIllustration" => get_field($subPage->ID), - )); - ?> +
- + + $subPage->post_title, + "excerpt" => get_the_excerpt($subPage->ID), + "permalink" => get_the_permalink($subPage->ID), + "coverIllustration" => get_field("page_illustration", $subPage->ID), + )); + ?> + +