If you are working on a WordPress theme that uses the wp_bootstrap_navwalker, open it in your editor and search for:

// If item has_children add atts to a.
if ( $args->has_children && $depth === 0 ) {
   $atts['href']        = '#';
   $atts['data-toggle'] = 'dropdown';
   $atts['class']           = 'dropdown-toggle';
} else {
   $atts['href'] = ! empty( $item->url ) ? $item->url : '';
}

Replace it with

// If item has_children add atts to a.
if ( $args->has_children && $depth === 0 ) {
   $atts['href'] = ! empty( $item->url ) ? $item->url : '';
   //$atts['data-toggle']   = 'dropdown';
   $atts['class']           = 'dropdown-toggle';
} else {
   $atts['href'] = ! empty( $item->url ) ? $item->url : '';
}

Now open your style.css file and add the following lines:

ul.nav li.dropdown:hover ul.dropdown-menu {
    display: block; 
    margin: 0   
}
 
a.menu:after,
.dropdown-toggle:after {
	content: none;
}

Subscribe and receive my FREE eBook

4 Mistakes You're Making on Your Website that are Costing You money!

4 MISTAKES You're Making on Your Website that are Costing You MONEY!

  • This field is for validation purposes and should be left unchanged.

The Author

Leave a Reply

Your email address will not be published.

Ready to chat about how ThePixelPixie can help?