Fix dropdown when setting depth=0 in wp_nav_menu
This commit is contained in:
parent
05cbe7bedf
commit
cf4d843cde
|
@ -185,7 +185,7 @@ if ( ! class_exists( 'Understrap_WP_Bootstrap_Navwalker' ) ) {
|
|||
$atts['target'] = ! empty( $item->target ) ? $item->target : '';
|
||||
$atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : '';
|
||||
// If item has_children add atts to <a>.
|
||||
if ( isset( $args->has_children ) && $args->has_children && 0 === $depth && $args->depth > 1 ) {
|
||||
if ( isset( $args->has_children ) && $args->has_children && 0 === $depth && $args->depth !== 1 ) {
|
||||
$atts['href'] = '#';
|
||||
$atts['data-toggle'] = 'dropdown';
|
||||
$atts['aria-haspopup'] = 'true';
|
||||
|
|
Reference in New Issue