removing sidebar from pages that aren't in the main nav menu. If they are in the...
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 28 Oct 2016 12:39:05 +0000 (08:39 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 28 Oct 2016 12:39:05 +0000 (08:39 -0400)
lib/navigation.php

index 522afe6..a51ec68 100644 (file)
@@ -214,9 +214,8 @@ function glm_side_menu($mobile = false) {
         $thisPageMenuParent = (isset($pageMenuId[0])) ? $pageMenuId[0]->menu_item_parent : 0;
     }
     // does the current page (in the menu) have sub menu items?
-    if (isset($sideMenu[$thisPageMenuId]) && !empty($sideMenu[$thisPageMenuId])) {
+    if (isset($sideMenu[$thisPageMenuId]) && !empty($sideMenu[$thisPageMenuId]) && $thisPageMenuId !== 0) {
         $pageHead  = (isset($allMenu[$thisPageMenuId])) ? $allMenu[$thisPageMenuId] :  (object) array('url' => '', 'target' => '', 'title' => '');
-        
         // get the subs for $thisPageMenuId
         $subs = $sideMenu[$thisPageMenuId];
         // If the first element is title [Tabs] then this is a uber menu