ECHO THE MEMBER LIST SHORTCODE
authorLaury GvR <laury@gaslightmedia.com>
Wed, 6 Feb 2019 01:11:05 +0000 (20:11 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Wed, 6 Feb 2019 01:11:05 +0000 (20:11 -0500)
sections/interior-page.php

index ea77553..4c217cc 100644 (file)
         <?php if ( $isCountyChildPage ) {
             if(strpos($countyChildren[$post->ID], 'Water') !== false ){
                 $debugMsg[] = "I'm a waterfall page";
-                $memberCategory = '25'; // L: 3, dev70: 25
+                $memberCategory = '3'; // L: 3, dev70: 25
             } else if(strpos($countyChildren[$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";
             }
@@ -70,6 +70,7 @@
                 } 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( $post ) );
+                    $debugMsg[] = "membercountyid var value: $memberCountyId";
                 } else {
                     $debugMsg[] = "no county page id?";
                 }
@@ -84,7 +85,7 @@
         // - 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;
+        $debugMsg[] = "Is county child?" . ($isCountyChildPage ? 'true' : 'false') . " member county pageID: " . $countyPageId;
     ?>
     
     
@@ -95,7 +96,7 @@
     <?php } else if ( $isCountyChildPage && $memberCountyId) { ?>
         <div id="counties-map">
             <?php 
-                do_shortcode("[glm-members-list show='-list' category='". $memberCategory ."' county-search='". $memberCountyId ."']");
+                echo do_shortcode("[glm-members-list show='-list' view='map' category='". $memberCategory ."' county-search='". $memberCountyId ."']");
                 echo "Map loads here ( county = $memberCountyId , memberCategory = $memberCategory )";
             ?>
         </div>