fixed sytanx error in the nav image map args array
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 2 Aug 2016 18:03:03 +0000 (14:03 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 2 Aug 2016 18:03:03 +0000 (14:03 -0400)
parts/community-map.php

index 94a9450..38e666a 100644 (file)
@@ -27,7 +27,7 @@
     </li>
 </ul>
 <?php 
-    $args = array(
+    $nav_args = array(
     'post_type' => 'page',
     'post__in' => array(276,275,274,273,983,981,985),
     'posts_per_page' => -1, 
 //    'post__in' => array(69,71,73,75, 77, 79)
 );
 
-$posts = get_posts($args);
+$nav_posts = get_posts($nav_args);
 
-foreach ($posts as $p){
+foreach ($nav_posts as $p){
     $sites[$p->ID] = get_permalink($p->ID);
 }
     $js_sites = json_encode($sites);
 ?>
     
+
 <script type="text/javascript">
     imageMapResize();
-    var site_array = <?php echo $js_sites ?>;
+    var site_array = 
     var id;
     
     function get_id(el){
-//        console.log(el.getAttribute("data-id"));
         id = el.getAttribute("data-id"); 
         window.location.href = site_array[el.getAttribute("data-id")];
-//        console.log(site_array[el.getAttribute("data-id")]);
+
     }
     
-</script>
\ No newline at end of file
+</script>