From afbed2280faff26bac9795666bbca06961e32059 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Fri, 15 Feb 2019 17:25:12 -0500 Subject: [PATCH] Child pages of the counties page default to using the county-page template --- sections/interior-page.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sections/interior-page.php b/sections/interior-page.php index b1d3133..cce743a 100644 --- a/sections/interior-page.php +++ b/sections/interior-page.php @@ -3,6 +3,10 @@ $countyPageId = -1; // Find template - remove file extension for easier checking. Assign container class based on template $template = str_replace( ".php", "", get_page_template_slug( $post->ID ) ); + // All child pages of the counties page default to using the county-page template + if ( $template == "" && is_in_tree( COUNTIES_PAGE_ID ) ) { + $template = "county-page"; + } ?>
-- 2.17.1