Hi Rob,
I am so sorry- we didn’t receive a notification again, even though we’re subscribed to the topic.
If you still need this functionality, here are the steps to achieve it:
1. Copy (not move) /includes/wp_bootstrap_navwalker.php from your parent theme into the same location within your child theme.
2. In the child copy of this file, replace this code around line 128:
// If item has_children add atts to a.
if ( $args->has_children && $depth === 0 ) {
$atts['href'] = '#';
$atts['data-toggle'] = 'dropdown';
$atts['class'] = 'dropdown-toggle';
$atts['aria-haspopup'] = 'true';
$atts['aria-expanded'] = 'false';
} else {
$atts['href'] = ! empty( $item->url ) ? $item->url : '';
}
With this code:
//For clickable parent nodes
if ( $args->has_children && $depth === 0 ) {
$atts['class'] = 'dropdown-toggle';
$atts['aria-haspopup'] = 'true';
$atts['aria-expanded'] = 'false';
}
$atts['href'] = ! empty( $item->url ) ? $item->url : '';
3. In your child functions.php, add this line just after the opening PHP tag:
require get_theme_file_path('/includes/wp_bootstrap_navwalker.php');
If you have any trouble, just let us know- I’ll try to manually keep an eye on this thread since we’re not receiving notifications.