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
Top Level Drop Down Menu Link #113
Comments
@NickMcBurney It's because of the bootstrap |
This looks like it could be a workable solution: http://jsfiddle.net/R3JKz/15/ (source) |
Just to let you guys know, the fix didn't work for me. |
@NiviJah Yeah, I tried to make that fiddle work and gave up. That's all you needed to change to get it working? |
This is the version I use that seems to work pretty well CSS change to @media (min-width: 768px):
Change to navwalker
Then in a jQuery file
|
👍 Thanks @Bradley-D! |
@jazzsequence you're welcome. hope it works the way you want. |
Thanks NiviJah. Worked great. Would be cool to maybe make this a setting for future releases as I would imagine it is requested frequently. |
This has been proposed many times, but unfortunately this is not something that would be added to the class. The reasons for this are two fold:
Looking at it from a UX standpoint I often challenge other to rethink their menu structure. A menus should ultimately be the simplest form of navigation possible. Here are my personal navigation rules:
|
thanks |
@Bradley-D @NickMcBurney @jazzsequence Hi, we use : $atts['href'] = ! empty( $item->url ) ? $item->url : ''; on wp_bootstrap_navwalker.php And... Our header responsive is :
And Working ! Thanks for your solution ! |
@NickMcBurney Thanks for help |
The link is attached, but you will have to remove the following code to make the link clickable (Bootstrap 4):
To
|
@Bradley-D your solution is perfect, but the link it is still unactive, I've verified it by doing: if ( $args->has_children && $depth === 0 ) { |
Here is a basic way to make the parent clickable work on mobile with a little jQuery after you manipulate the navwalker (using MobileDetect.js):
|
@inksea Hi! Thanks for that it worked! I only had to change the I have a question, though! I cannot make it work on the iPad (the simple not Pro). Every other resolution is fine but I cannot find why it does not work on the iPad; is there any CSS code that might help me? |
This worked best for me and it was the easiest.
|
Just so it is written and documented. The non-clickable parent menu item is by intention: |
I was wondering if anyone has found a fix to allow top level drop down menus link?
I have managed to add the correct url to the link by changing line 85 of wp_bootstrap_navwalker.php from
$atts['href'] = '#';
To
$atts['href'] = ! empty( $item->url ) ? $item->url : '';
and by adding this CSS:
ul.nav li.dropdown:hover ul.dropdown-menu {
display: block !important;
}
This displays the submenu when hovering and links to top level link to the correct page but forsome reason when I click to view the toplevel page nothing happens?
Help much appreiated!
Thanks,
Nick
The text was updated successfully, but these errors were encountered: