diff --git a/functions.php b/functions.php index ff6ae60fc81cd29c3ce3b399d3898300e895eab8..1d5a78b4129345e376177263f74a95c85c715172 100644 --- a/functions.php +++ b/functions.php @@ -129,7 +129,7 @@ function print_item($item, $class){ function build_menu($parent, $tree){ foreach($tree[$parent] as $i => $item){ - $class=menu_active($item)?'active':''; + $class=menu_active($item)&&$parent==0?'active':''; if(array_key_exists($item->id, $tree)){ echo '<li class="dropdown '.$class.'"><a class="dropdown-toggle" data-toggle="dropdown" href="#">'.menu_name($item).'<span class="caret"></span></a>'; echo '<ul class="dropdown-menu">';