diff --git a/template-empty-parent.php b/template-empty-parent.php index 2b0d1ae..eb3e748 100644 --- a/template-empty-parent.php +++ b/template-empty-parent.php @@ -6,9 +6,6 @@ $currentThematique = get_the_terms(get_the_ID(), 'thematiques')[0]; $mainThematique = getMainThematique($currentThematique); $thematiqueColorSlug = $mainThematique->slug; - - - ?>
@@ -17,7 +14,7 @@ $thematiqueColorSlug = $mainThematique->slug; post_parent !== 0 ? get_post($currentPage->post_parent) : null; - $grandParentPage = $parentPage->post_parent ? get_post($parentPage->post_parent) : null; + $grandParentPage = $parentPag && $parentPage->post_parent ? get_post($parentPage->post_parent) : null; $args = array( 'posts_per_page' => -1, @@ -28,9 +25,6 @@ $thematiqueColorSlug = $mainThematique->slug; ); $childrenPages = get_children($args); - // echo '
';
-			// print_r($childrens);
-			// echo '
'; ?>