diff --git a/inc/submenu-check.php b/inc/submenu-check.php index 9709d04..c79d527 100644 --- a/inc/submenu-check.php +++ b/inc/submenu-check.php @@ -12,7 +12,7 @@ if ( ( $locations = get_nav_menu_locations() ) && isset( $locations[ $menu_name if($menu_item->object_id == get_the_ID()) $current_id = $menu_item->ID; } foreach($menu_items as $key => $menu_item) { - while($menu_item->menu_item_parent != array_pop($stack)) { + while(in_array($menu_item->menu_item_parent, $stack) && $menu_item->menu_item_parent != array_pop($stack)) { $level--; } $level++; diff --git a/page.php b/page.php index df71bf3..20bf354 100644 --- a/page.php +++ b/page.php @@ -1,37 +1,37 @@ - - -
- - -
-
-
-
- - -
-
-
- -
- - -
- + + +
+ + +
+
+
+
+ + +
+
+
+ +
+ + +
+