- How do I make my parent menu clickable in Wordpress?
- Should top level navigation be clickable?
- How do I keep a dropdown menu open on click?
How do I make my parent menu clickable in Wordpress?
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 ) ?
Should top level navigation be clickable?
Without a clickable link in the top-level navigation, a malfunctioning menu will make it impossible for users to properly navigate your site. The top-level navigation item's page should be an overview of the sub-items in its dropdown menu.
How do I keep a dropdown menu open on click?
(item changes backgorund on hover and on click). Set toggle=false property inside DropdownItem to prevent dropdown from closing.