From bc7d3362bc687491d0d60efc2c906a625274f6ac Mon Sep 17 00:00:00 2001 From: Antoine M Date: Tue, 5 Nov 2024 15:26:01 +0100 Subject: [PATCH] fixing condition onGrandparent --- template-archive-jobs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-archive-jobs.php b/template-archive-jobs.php index a415bea..18cb555 100644 --- a/template-archive-jobs.php +++ b/template-archive-jobs.php @@ -14,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 = $parentPage && $parentPage->post_parent ? get_post($parentPage->post_parent) : null; ?>