Last active
June 3, 2024 08:29
-
-
Save imuhammadshoaib/19ec63889bcf0bd0ac038cf86e850a50 to your computer and use it in GitHub Desktop.
Make parent link clickable in Bootstrap with Wordpress NavWalker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
*Add this CSS in your (style.css) file. | |
*/ | |
.dropdown:hover>.dropdown-menu { | |
display: block; | |
} |
What helped the mobile implementation on my end was adding "border: 1px solid #eee;" to the toggle class (the "+"). This helps the user notice there are two-click points, one to toggle and the parent link.
Thank still works
thanks that works
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a very good question @bodaiz . I will think conditions could be added to "class-wp-bootstrap-navwalker.php" to allow for this. My concern is that this will revert the parent to not having a working href as assigned. The issue with the above solution(patch) is that it render the touch toggle mobile unusable. @kokoruz To your point, in my end the "+" does toggle the dropdown on mobile, but I don't remember is this functionality is out of the box or I added it. Thoughts?