wp-bootstrap-navwalker
wp-bootstrap-navwalker copied to clipboard
iPad (and iOS devices?) needs href
Hello,
I had to add :
$attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $item->url ) .'"' : ''; // FOR IPAD $attributes .= empty( $item->url ) ? ' href="#"' : '';
in start_el function, because drop downs will not work on an "a" element without an href attribute declared, on an iPad 1 with iOS 5.1.1.
That is understandable. I will add a tweak to the main script. Personally I always put a hash # in the URL field but I can't assume everyone will do that.
Great ! Thank you otherwise for providing an out-of-the-box solution, great time saver.