From 388882c5f55a9d52b3b0ee23ed252ecacee7bd8c Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Tue, 5 Feb 2019 19:52:17 -0500 Subject: [PATCH] More debug messages for checking county id --- sections/interior-page.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sections/interior-page.php b/sections/interior-page.php index bf4997f..0d9c339 100644 --- a/sections/interior-page.php +++ b/sections/interior-page.php @@ -67,9 +67,11 @@ if ( get_field( 'member_county_id' ) ) { $debugMsg[] = "using count page id"; $memberCountyId = get_field( 'member_county_id' ); - } else if ( get_field( 'member_county_id', wp_get_post_parent_id() ) ) { + } else if ( get_field( 'member_county_id', wp_get_post_parent_id( $post ) ) ) { $debugMsg[] = "using county page id of parent"; - $memberCountyId = get_field( 'member_county_id', wp_get_post_parent_id() ); + $memberCountyId = get_field( 'member_county_id', wp_get_post_parent_id( $post ) ); + } else { + $debugMsg[] = "no county page id?"; } } ?> @@ -82,9 +84,10 @@ // - county sub page: member db map for that county from custom field // - any other page: crowdriff script from custom field if exists, // --- otherwise featured image if exists - + $debugMsg[] = "Is county child:" . $isCountyChildPage . " memberCountyID: " . $countyPageId; ?> +
ID); ?> -- 2.17.1