jprieton / wp-bootstrap4-navwalker

A custom WordPress nav walker class to fully implement the Twitter Bootstrap 4.x navigation style in a custom theme using the WordPress built in menu manager
GNU General Public License v3.0
40 stars 56 forks source link

Dropdown items have the nav-link class, but they should only have 'dropdown-item' as class. #4

Closed leonidlezner closed 6 years ago

leonidlezner commented 6 years ago

Dropdown items have the nav-link class, but they should only have 'dropdown-item' as class.

      $item_classes = array( 'nav-link' );

      if ( $args->walker->has_children ) {
        $item_classes[] = 'dropdown-toggle';
      }

      if ( 0 < $depth ) {
        // Remove the nav-link class!!
        unset($item_classes[0]); 

        $item_classes[] = 'dropdown-item';
      }
jprieton commented 6 years ago

Fixed! Thanks @leonidlezner