From: Laury GvR Date: Fri, 15 Feb 2019 22:25:12 +0000 (-0500) Subject: Child pages of the counties page default to using the county-page template X-Git-Tag: v1.0.0^2~80 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=afbed2280faff26bac9795666bbca06961e32059;p=WP-Themes%2Fuptravel.git Child pages of the counties page default to using the county-page template --- 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"; + } ?>