<?php if ( $post->ID == COUNTIES_PAGE_ID ) { ?>
<?php
// I'm the counties page
- $debugMsg[] = "I'm the counties page";
+ // $debugMsg[] = "I'm the counties page";
$isCountiesPage = true;
?>
<?php } else if ( wp_get_post_parent_id( $post ) == COUNTIES_PAGE_ID ) { ?>
<?php
// I'm a county page
- $debugMsg[] = "I'm a county page";
+ // $debugMsg[] = "I'm a county page";
$isCountyLandingPage = true;
$countyPageId = $post->ID;
?>
<?php } else { ?>
<?php
// I'm a child of a county page
- $debugMsg[] = "I'm a child of a county page";
+ // $debugMsg[] = "I'm a child of a county page";
$isCountyChildPage = true;
$countyPageId = wp_get_post_parent_id( $post );
$debugMsg[] = "post: " . get_the_title($post->ID);
<?php } ?>
<?php
- $countyPageId = get_county_page_id();
- $countyChildren = get_county_page_children($countyPageId);
+ $countyPageId = get_county_page_id();
+ $countyChildren = get_county_page_children($countyPageId);
?>
<?php if ( $countyChildren ) {
if(strpos(get_the_title($post->ID), 'Water') !== false ){
- $debugMsg[] = "I'm a waterfall page";
- $memberCategory = '3'; // L: 3, dev70: 25
+ // $debugMsg[] = "I'm a waterfall page";
+ $memberCategory = '25'; // L: 3, dev70: 25
} else if(strpos(get_the_title($post->ID), 'Light') !== false ){
- $debugMsg[] = "I'm a lighthouse page";
- $memberCategory = '4'; // L: 4, ddev70: 21
+ // $debugMsg[] = "I'm a lighthouse page";
+ $memberCategory = '21'; // L: 4, ddev70: 21
} else {
- $debugMsg[] = "I'm neither waterfall nor a light house";
+ // $debugMsg[] = "I'm neither waterfall nor a light house";
}
} ?>
<?php
if ( $countyPageId && function_exists("get_field") ) {
if ( get_field( 'member_county_id' ) ) {
- $debugMsg[] = "using count page id";
+ // $debugMsg[] = "using count page id";
$memberCountyId = get_field( 'member_county_id' );
} else if ( get_field( 'member_county_id', wp_get_post_parent_id( $post ) ) ) {
- $debugMsg[] = "using county page id of parent";
+ // $debugMsg[] = "using county page id of parent";
$memberCountyId = get_field( 'member_county_id', wp_get_post_parent_id( $post ) );
- $debugMsg[] = "membercountyid var value: $memberCountyId";
+ // $debugMsg[] = "membercountyid var value: $memberCountyId";
} else {
- $debugMsg[] = "no county page id?";
+ // $debugMsg[] = "no county page id?";
}
}
?>
- <?php } else { ?>
+ <?php } else {
$debugMsg[] = "Im not in the county tree";
- <?php } ?>
+ } ?>
<?php
// Find out what header to show;
// - county landing page: crowdriff script from custom field
<?php echo glm_get_header(); ?>
</div>
<?php } ?>
+
<?php
foreach ($debugMsg as $k) {
//echo "<br>$k";
$countyChildren = get_county_page_children($countyPageId);
?>
<?php if ( $countyChildren ) { ?>
- <?php global $post; ?>
- <?php if (has_post_thumbnail( $post->ID ) ): ?>
- <?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'large'); ?>
- <?php endif; ?>
- <?php if (function_exists('the_field') && get_field('interior_header_crowdriff_script',$post->ID)) { ?>
- <div id="header-crowdriff">
- <?php echo the_field('interior_header_crowdriff_script',$post->ID); ?>
- </div>
- <?php } ?>
<div id="county-buttons-container" class="row" >
<div id="county-buttons">