adding defines for the business page ids
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 28 Jan 2019 23:01:20 +0000 (18:01 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 28 Jan 2019 23:01:20 +0000 (18:01 -0500)
functions.php
index.php
lib/navigation.php

index e67bda8..d471b31 100644 (file)
@@ -1,7 +1,9 @@
 <?php
 require_once 'lib/menu-walker.php';
 require_once 'lib/navigation.php';
-
+// dev = 5100
+// live = 11148
+define("BUSINESS_PAGE", 5100);
 $ancestorId   = null;
 $includePages = array();
 $frontPageId  = get_option('page_on_front');
index fd9036a..cd747b1 100644 (file)
--- a/index.php
+++ b/index.php
 
                 <div class="side-links Large-4 show-for-large-up columns left">
                     <?php get_sidebar(); ?>
-                    <?php if(is_page(11148) || 11148 == $post->post_parent || is_tree(11148)){ ?>
+                    <?php if(is_page(BUSINESS_PAGE) || BUSINESS_PAGE == $post->post_parent || is_tree(BUSINESS_PAGE)){ ?>
                         <div class="business-info">
                             <div class="business-info-data" style="font-weight: bold;">One Stop Shop</div>
                             <div class="business-info-data">225 West Main Street, Gaylord, MI</div>
                             <div class="business-info-data">Phone: (989) 731-0287</div>
                             <div id="one-stop-shop-interior" class="small-8 columns row">
-                                <a  id="one-stop-shop-link" href="<?php echo get_permalink(11148);?> "> <i class="fas fa-chart-line business-icon"></i>CONNECT TO US<i class="fas fa-caret-right arrow-icon"></i></a>
+                                <a  id="one-stop-shop-link" href="<?php echo get_permalink(BUSINESS_PAGE);?> "> <i class="fas fa-chart-line business-icon"></i>CONNECT TO US<i class="fas fa-caret-right arrow-icon"></i></a>
                             </div>
                         </div>
                     <?php }?>
index 2ae7973..2f2fe8a 100644 (file)
@@ -223,7 +223,7 @@ function glm_side_menu($mobile = false) {
             $menu       = wp_get_nav_menu_object($locations['top-bar-6']);
         }
     }
-    if(is_page(11148) || 11148 == $post->post_parent || is_tree(11148)){
+    if(is_page(BUSINESS_PAGE) || BUSINESS_PAGE == $post->post_parent || is_tree(BUSINESS_PAGE)){
         if (($locations = get_nav_menu_locations()) && isset($locations['one-stop-shop'])) {
             $menu       = wp_get_nav_menu_object($locations['one-stop-shop']);
         }