From: Laury GvR Date: Sun, 10 Feb 2019 21:02:15 +0000 (-0500) Subject: County landing and sub page functionality integrated into interior template X-Git-Tag: v1.0.0^2~108^2~16 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=c1fd62ffc90ec2970b3270dc919eb11216fa2a70;p=WP-Themes%2Fuptravel.git County landing and sub page functionality integrated into interior template --- diff --git a/county-landing-page-template.php b/county-landing-page-template.php deleted file mode 100644 index 0a65909..0000000 --- a/county-landing-page-template.php +++ /dev/null @@ -1,5 +0,0 @@ -ID == COUNTIES_PAGE_ID ) { - // I'm the counties page - } else if ( wp_get_post_parent_id( $post ) == COUNTIES_PAGE_ID ) { - // I'm a county page - $countyPageId = $post->ID; - } else { - // I'm a child of a county page - $countyPageId = wp_get_post_parent_id( $post ); + if ( is_in_tree( COUNTIES_PAGE_ID ) ) { + if ( $post->ID == COUNTIES_PAGE_ID ) { + // I'm the counties page + } else if ( wp_get_post_parent_id( $post ) == COUNTIES_PAGE_ID ) { + // I'm a county page + $countyPageId = $post->ID; + } else { + // I'm a child of a county page + $countyPageId = wp_get_post_parent_id( $post ); + } } return $countyPageId; diff --git a/landing-page.php b/landing-page.php deleted file mode 100644 index cc431b2..0000000 --- a/landing-page.php +++ /dev/null @@ -1,5 +0,0 @@ -
- - ID; - ?> - - ID); - ?> - - + ID), 'Water') !== false ){ // $debugMsg[] = "I'm a waterfall page"; - $memberCategory = '25'; // L: 3, dev70: 25 + $memberCategory = '3'; // L: 3, dev70: 25 } else if(strpos(get_the_title($post->ID), 'Light') !== false ){ // $debugMsg[] = "I'm a lighthouse page"; - $memberCategory = '21'; // L: 4, ddev70: 21 + $memberCategory = '4'; // L: 4, ddev70: 21 } else { // $debugMsg[] = "I'm neither waterfall nor a light house"; } @@ -81,7 +59,11 @@ ?> - ID == COUNTIES_PAGE_ID ) { ?> + ID == COUNTIES_PAGE_ID && ( function_exists('the_field') && get_field('interior_header_crowdriff_script',$post->ID) )) { ?> +
+ ID); ?> +
+ ID)) { ?>
ID); ?>
@@ -91,11 +73,7 @@ echo do_shortcode("[glm-members-list show='-list' view='map' category='". $memberCategory ."' county-search='". $memberCountyId ."']"); ?> - ID)) { ?> -
- ID); ?> -
- + @@ -177,37 +155,9 @@ - -
-
- ID); ?> - ID); ?> - ID); ?> - -
-
- -
-
- - - -
-
- ID); ?> - ID); ?> - ID); ?> - -
-
- -
-
- -
-
+
diff --git a/sidebar.php b/sidebar.php index 59186e7..5ee2412 100644 --- a/sidebar.php +++ b/sidebar.php @@ -1,42 +1,44 @@