From: Anthony Talarico Date: Fri, 28 Oct 2016 12:39:05 +0000 (-0400) Subject: removing sidebar from pages that aren't in the main nav menu. If they are in the... X-Git-Tag: v1.0.0^2~57 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=eacec0b1ee5afc0d02ee8172be8ba4834b09c463;p=WP-Themes%2Fkalamazoobeerweek.git removing sidebar from pages that aren't in the main nav menu. If they are in the nav menu, no sidebar if they don't have sub menu children --- diff --git a/lib/navigation.php b/lib/navigation.php index 522afe6..a51ec68 100644 --- a/lib/navigation.php +++ b/lib/navigation.php @@ -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