Map uses hardcoded page IDs instead of slugs
authorLaury GvR <laury@gaslightmedia.com>
Tue, 21 Aug 2018 20:15:16 +0000 (16:15 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 21 Aug 2018 20:15:16 +0000 (16:15 -0400)
parts/header-meta.php
parts/map-section.php

index 07e7269..0f1320d 100644 (file)
@@ -2,7 +2,7 @@
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <title><?php wp_title(); ?></title>
-    <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() ; ?>/css/app.css?v=0.0.0.1">
+    <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() ; ?>/css/app.css?v=0.0.0.2">
     <link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico?v=0.0.0.2">
     <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700' rel='stylesheet' type='text/css'>
     <link href="//fonts.googleapis.com/css?family=Shadows+Into+Light" rel="stylesheet">
index 35192be..9209bc1 100644 (file)
@@ -4,13 +4,30 @@
     <div id="right-of-map" class="side-of-map"></div><!-- WP CITY PAGE DATA FOR JS PROCESSING -->
 
     <?php
-        $pages = [  'ocqueoc-falls-bicentennial-pathway', 'thompsons-harbor-state-park', 'leer-road-sinkholes','old-new-presque-isle-lighthouses', 
-                    'rockport-state-recreation-area','middle-island-lighthouse','little-red-lighthouse','thunder-bay-island-lighthouse', 'norway-ridge-pathway',
-                    'thunder-bay-national-marine-sanctuary', 'chippewa-hills-pathway', 'negwegon-state-park', 'sturgeon-point-lighthouse', 'visit-alpena'];
+        $ocqueocPathway_id      = 77245;
+        $thompsonsPark_id       = 77215;
+        $leerSinkholes_id       = 69089;
+        $presqueLighthouse_id   = 77592;
+        $rockportRecreation_id  =  3674;
+        $middleLighthouse_id    =  2007;
+        $littleRed_id           = 77580;
+        $thunderLighthouse_id   = 81256;
+        $norwayRidge_id         = 77220;
+        $thunderSanctuary_id    =  2009;
+        $chippewaPathway_id     = 77218;
+        $negwegonPark_id        = 77210;
+        $sturgeonLighthouse_id  = 81258;
+        $visitAlpena_id         = 77572;
+
+        $pages = [  $ocqueocPathway_id, $thompsonsPark_id, $leerSinkholes_id, $presqueLighthouse_id, 
+                    $rockportRecreation_id, $middleLighthouse_id, $littleRed_id, $thunderLighthouse_id, $norwayRidge_id,
+                    $thunderSanctuary_id, $chippewaPathway_id, $negwegonPark_id, $sturgeonLighthouse_id, $visitAlpena_id];
+        
+
         $locations = array();
         foreach($pages as $page){
             $args = array(
-                'name'        => $page,
+                'id'          => $page,
                 'post_type'   => 'page',
                 'post_status' => 'publish',
                 'numberposts' => 1