refining page empty parent
This commit is contained in:
parent
117bb39c44
commit
2a70b7ba43
5
resources/css/pages/template-empty-parent.css
Normal file
5
resources/css/pages/template-empty-parent.css
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
.template-empty-parent {
|
||||
.page-cards {
|
||||
@apply mt-12 mb-20;
|
||||
}
|
||||
}
|
||||
|
|
@ -11,7 +11,7 @@ $thematiqueColorSlug = $mainThematique->slug;
|
|||
|
||||
?>
|
||||
|
||||
<div class="homegrade-page-container <?php echo $thematiqueColorSlug ? "homegrade-page-container--" . $thematiqueColorSlug : "" ?>">
|
||||
<div class="homegrade-page-container template-empty-parent">
|
||||
|
||||
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
|
||||
<?php
|
||||
|
|
@ -24,6 +24,7 @@ $thematiqueColorSlug = $mainThematique->slug;
|
|||
'order' => 'ASC',
|
||||
'post_parent' => $currentPage->ID,
|
||||
'post_type' => 'page',
|
||||
'status' => 'publish',
|
||||
);
|
||||
|
||||
$childrenPages = get_children($args);
|
||||
|
|
@ -52,26 +53,29 @@ $thematiqueColorSlug = $mainThematique->slug;
|
|||
</ol>
|
||||
</nav>
|
||||
|
||||
|
||||
<?php
|
||||
get_template_part("template-components/heading-box", null, array(
|
||||
"pageIcon" => $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),
|
||||
));
|
||||
?>
|
||||
<?php foreach ($childrenPages as $subPage) : ?>
|
||||
<?php
|
||||
get_template_part("template-components/cards/page-card", null, array(
|
||||
"title" => $subPage->post_title,
|
||||
"excerpt" => get_the_excerpt($subPage->ID),
|
||||
"permalink" => get_the_permalink($subPage->ID),
|
||||
"coverIllustration" => get_field($subPage->ID),
|
||||
));
|
||||
?>
|
||||
|
||||
<div class="page-cards">
|
||||
|
||||
<?php endforeach; ?>
|
||||
<?php foreach ($childrenPages as $subPage) : ?>
|
||||
<?php
|
||||
get_template_part("template-components/cards/page-card", null, array(
|
||||
"title" => $subPage->post_title,
|
||||
"excerpt" => get_the_excerpt($subPage->ID),
|
||||
"permalink" => get_the_permalink($subPage->ID),
|
||||
"coverIllustration" => get_field("page_illustration", $subPage->ID),
|
||||
));
|
||||
?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user