wp-bootstrap-navwalker icon indicating copy to clipboard operation
wp-bootstrap-navwalker copied to clipboard

I Can't Get dropdown to work....

Open sashifflett opened this issue 12 years ago • 7 comments

My dropdown menu for my site is not working... I have tried to look at some of the other solved issues relating to this and I can not seem to find a solution that will work for me. I am sure I am overlooking something so small that is making big problems for me. Any help on this issue would be really appreciated. My site is http://bdpwp.stacyshifflett.com/. Below is my header.php and functions.php
header

functions

sashifflett avatar Feb 26 '14 20:02 sashifflett

That is a interesting one. Looking at the code that is output it looks like everything with the waker is working correctly form a structural perspective.

If you open dev tools and look at the code, when you click the link it is applying the open class to the button. This leads me to believe that the bootstrap javascript is working as well.

By process of elimination is looks to me like the issue is your CSS is missing the class to display the dropdown or it is being overwritten. Try adding this at the bottom of your CSS.

.open>.dropdown-menu {
    display: block;
}

SideQuestDIY avatar Feb 26 '14 20:02 SideQuestDIY

Just added it and it still doesn't want to work.

sashifflett avatar Feb 26 '14 20:02 sashifflett

i'm guessing you are a newbie to web design and bootstrap, let me give you a little hint ( jQuery)

ghost avatar Feb 26 '14 20:02 ghost

@brody182, I am a newbie and I was wondering if jQuery is the problem. But could it be the problem if some of the items that require jQuery work fine, like the mobile nav (except for the drop-down inside of that of course).

sashifflett avatar Feb 26 '14 20:02 sashifflett

if you look in the source do you see jQuery?

ghost avatar Feb 26 '14 20:02 ghost

if you are using bootstrap 3.1 use this code, (not the code twittem gave you)

'primary', 'theme_location' => 'primary', 'depth' => 2, 'container' => 'div', 'container_class' => 'collapse navbar-collapse', 'container_id' => 'bs-example-navbar-collapse-1', 'menu_class' => 'nav navbar-nav', 'fallback_cb' => 'wp_bootstrap_navwalker::fallback', 'walker' => new wp_bootstrap_navwalker()) ); ?>

ghost avatar Feb 26 '14 20:02 ghost

@brody182 you are a genius!!! Thank you so much for your help, I have been trying to get this to work for weeks!

sashifflett avatar Feb 26 '14 20:02 sashifflett