$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";
+ }
?>
<main class="page-inside <?php echo ($template ?: 'default-template');?>">
<?php if ( is_in_tree( COUNTIES_PAGE_ID ) ) { ?>