I have configured my menu with two levels, but the top level doesn’t function if it has children. For example:
About Me
- Sublink 1
- Sublink 2
“About Me” works if I remove the sublinks, but does not work with them in place. Any suggestions?
I have configured my menu with two levels, but the top level doesn’t function if it has children. For example:
About Me
“About Me” works if I remove the sublinks, but does not work with them in place. Any suggestions?
I am also having the same issue as flyonover. My top level menu does not function when I have any sublinks present. The issue can be seen here: http://www.insearchofwonder.com/
Please help!
For this you need to edit navwalker.php file that you can find in theme folder - inc. Here’s the relevant code from that file:
// 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 : '';
}
You can comment out (you can also remove those lins) every line from code above except this one single line:
$atts['href'] = ! empty( $item->url ) ? $item->url : '';
Now top menu item will have its default behaviour.
HI,
I am having the same issue in dazzling. I found the same file in the theme folder under inc, made the changes but nothing happened. I am using child-themes. Was wondering if it is done differently in Dazzling?