Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clickable parent #26

Open
Lasse-Niller opened this issue Apr 15, 2022 · 1 comment
Open

Clickable parent #26

Lasse-Niller opened this issue Apr 15, 2022 · 1 comment

Comments

@Lasse-Niller
Copy link

Is i possible to make the parent stay clickable when having children items?

@damiansonek
Copy link

My solution is:

Replace
$attributes .= ( $args->walker->has_children ) ? ' class="'. $nav_link_class . $active_class . ' dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"' : ' class="'. $nav_link_class . $active_class . '"';

to
$attributes .= ( $args->walker->has_children ) ? ' class="'. $nav_link_class . $active_class . '" aria-haspopup="true" aria-expanded="false"' : ' class="'. $nav_link_class . $active_class . '"';

and triggering dropdown by css:
.menu-item-has-children:hover { .dropdown-menu { display:block !important; } }

However, take into account that I do not use navbar for the mobile version (I have my own) and I don't know how it will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants