diff --git a/navwalker.php b/navwalker.php
index 983fd7d..6a589b4 100644
--- a/navwalker.php
+++ b/navwalker.php
@@ -18,44 +18,40 @@
class Navwalker extends Walker_Nav_Menu {
- public function start_lvl( &$output, $depth = 0, $args = array() ) {
-
- $output .= "
";
- }
-
public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
- $liClasses = 'navbar-item '.$item->title;
+ $lowerCaseTitle = strtolower($item->title);
+ $linkTitle = str_replace(' ', '', $lowerCaseTitle);
+ $liClasses = 'navbar-item '.$linkTitle;
$hasChildren = $args->walker->has_children;
- $liClasses .= $hasChildren? " has-dropdown is-hoverable": "";
+ $liClasses .= $hasChildren ? " has-dropdown is-hoverable": "";
- if($hasChildren){
- $output .= "
";
- }
- $output .= "";
+ public function start_lvl( &$output, $depth = 0, $args = array() ) {
+ $output .= '
';
}
public function end_lvl (&$output, $depth = 0, $args = array()) {
+ $output .= "
";
+ }
+
+ public function end_el(&$output, $item, $depth = 0, $args = array(), $id = 0 ){
+
+ $output .= "";
- $output .= "
";
}
+
}
?>
\ No newline at end of file