I’m at the moment growing a web site and I have to make my dropdown menu guardian merchandise clickable. I’ve modified the wp-bootstrap-navwalker.php file to :
// If merchandise 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 : '';
}
Code which provides certainly a hyperlink to my guardian merchandise, however that’s solely taking place after I open the dropdown – So if I would like tot open the hyperlink to the entire class(Mum or dad Merchandise) i’ve to click on twice, as soon as for opening dropdown and the second time for truly going to the hyperlink.
I believe it might be a theme drawback that’s having some loading order code however I don’t truly know the place, the theme I’m utilizing is Uncode.
After utilizing that code, on Examine component i don’t see the data-toggle
info, so it labored, however not fairly.