I'm creating a website for my school with Material Design for Bootstrap and the NavWalker is giving me some issues, I want to change the element of dropdown i.e. from ul
to div
. I've tried to edit the NavWalker.
$output .= "\n$indent<div class=\" dropdown-menu dropdown-primary\" aria-labelledby=\"navbarDropdownMenuLink\" >\n";
I've edited the code and replaced the DIV instead of UL but don't know how to close the DIV. When I opened the Source Code it display like this
<div class=" dropdown-menu dropdown-promary" aria-labelledby="navbarDropdownMenuLin*k" >
<li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-60"><a title="About Us" href="http://example.com/about/">About Us</a></li>
<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-63"><a title="Year Plan" href="http://example.com/year-plan/">Year Plan</a></li>
<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-64"><a title="Staff" href="http://example.com/staff/">Staff</a></li>
<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-65"><a title="Fee and Uniform" href="http://example.com/fee-and-uniform">Fee and Uniform</a></li>
</ul>
This spoiled my navbar! Please help if anyone knows how to solve this issue. These are the links to NavWalker and the one that I've edited.
The original NavWalker file in text file Original NavWalker
The original NavWalker file in text file The Modified One